public class LruMemoryCache extends Object implements MemoryCache
构造器和说明 |
---|
LruMemoryCache(int maxSize) |
限定符和类型 | 方法和说明 |
---|---|
void |
clear()
Remove all items from cache
|
android.graphics.Bitmap |
get(String key)
Returns the Bitmap for
key if it exists in the cache. |
Collection<String> |
keys()
Returns all keys of cache
|
boolean |
put(String key,
android.graphics.Bitmap value)
Caches
Bitmap for key . |
android.graphics.Bitmap |
remove(String key)
Removes the entry for
key if it exists. |
String |
toString() |
public LruMemoryCache(int maxSize)
maxSize
- Maximum sum of the sizes of the Bitmaps in this cachepublic final android.graphics.Bitmap get(String key)
key
if it exists in the cache. If a Bitmap was returned, it is moved to the head
of the queue. This returns null if a Bitmap is not cached.get
在接口中 MemoryCache
public final boolean put(String key, android.graphics.Bitmap value)
Bitmap
for key
. The Bitmap is moved to the head of the queue.put
在接口中 MemoryCache
public final android.graphics.Bitmap remove(String key)
key
if it exists.remove
在接口中 MemoryCache
public Collection<String> keys()
MemoryCache
keys
在接口中 MemoryCache
public void clear()
MemoryCache
clear
在接口中 MemoryCache