Back to project page RZAndroidBaseUtils.
The source code is released under:
MIT License
If you think the Android project RZAndroidBaseUtils listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.raizlabs.imagecaching; /* ww w . j ava2 s .c om*/ import android.graphics.Bitmap; /** * Interface which declares a cache of bitmaps keyed by names. * @author Dylan James * */ public interface ImageCache { /** * Adds the given {@link Bitmap} to this cache under the given name (key). * @param imageName The name to store the {@link Bitmap} under. * @param bitmap The {@link Bitmap} to store */ public void addImage(String imageName, Bitmap bitmap); /** * Gets the image currently mapped to the given name, if one exists. * @param imageName The name of the image to get. * @return The current {@link Bitmap} or null if none exists */ public Bitmap getImage(String imageName); /** * Removes any image currently mapped to the given name. * @param imageName The name of the image to remove * @return The {@link Bitmap} which was removed, or null */ public Bitmap remove(String imageName); /** * Removes all images from this cache. */ public void purge(); }