@Override protected void onItemEvicted(@NonNull ModelKey<A> key, @Nullable B item) { key.release(); } };
/** * Get a value. * * @param model The model. * @param width The width in pixels of the view the image is being loaded into. * @param height The height in pixels of the view the image is being loaded into. * @return The cached result, or null. */ @Nullable public B get(A model, int width, int height) { ModelKey<A> key = ModelKey.get(model, width, height); B result = cache.get(key); key.release(); return result; }
/** * Get a value. * * @param model The model. * @param width The width in pixels of the view the image is being loaded into. * @param height The height in pixels of the view the image is being loaded into. * @return The cached result, or null. */ @Nullable public B get(A model, int width, int height) { ModelKey<A> key = ModelKey.get(model, width, height); B result = cache.get(key); key.release(); return result; }
@Override protected void onItemEvicted(ModelKey<A> key, B item) { key.release(); } };
/** * Get a value. * * @param model The model. * @param width The width in pixels of the view the image is being loaded into. * @param height The height in pixels of the view the image is being loaded into. * * @return The cached result, or null. */ public B get(A model, int width, int height) { ModelKey<A> key = ModelKey.get(model, width, height); B result = cache.get(key); key.release(); return result; }
@Override protected void onItemEvicted(ModelKey<A> key, B item) { key.release(); } };