public class LRULimitedMemoryCache extends LimitedMemoryCache
bitmap cache. Provides bitmaps storing. Size of all stored bitmaps will not to
exceed size limit. When cache reaches limit size then the least recently used bitmap is deleted from cache.| 构造器和说明 |
|---|
LRULimitedMemoryCache(int maxSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Remove all items from cache
|
protected Reference<android.graphics.Bitmap> |
createReference(android.graphics.Bitmap value)
Creates not strong reference of value
|
android.graphics.Bitmap |
get(String key)
Returns value by key.
|
protected int |
getSize(android.graphics.Bitmap value) |
boolean |
put(String key,
android.graphics.Bitmap value)
Puts value into cache by key
|
android.graphics.Bitmap |
remove(String key)
Removes item by key
|
protected android.graphics.Bitmap |
removeNext() |
getSizeLimitkeyspublic LRULimitedMemoryCache(int maxSize)
maxSize - Maximum sum of the sizes of the Bitmaps in this cachepublic boolean put(String key, android.graphics.Bitmap value)
MemoryCacheput 在接口中 MemoryCacheput 在类中 LimitedMemoryCachepublic android.graphics.Bitmap get(String key)
MemoryCacheget 在接口中 MemoryCacheget 在类中 BaseMemoryCachepublic android.graphics.Bitmap remove(String key)
MemoryCacheremove 在接口中 MemoryCacheremove 在类中 LimitedMemoryCachepublic void clear()
MemoryCacheclear 在接口中 MemoryCacheclear 在类中 LimitedMemoryCacheprotected int getSize(android.graphics.Bitmap value)
getSize 在类中 LimitedMemoryCacheprotected android.graphics.Bitmap removeNext()
removeNext 在类中 LimitedMemoryCacheprotected Reference<android.graphics.Bitmap> createReference(android.graphics.Bitmap value)
BaseMemoryCachecreateReference 在类中 BaseMemoryCache