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() |
getSizeLimit
keys
public LRULimitedMemoryCache(int maxSize)
maxSize
- Maximum sum of the sizes of the Bitmaps in this cachepublic boolean put(String key, android.graphics.Bitmap value)
MemoryCache
put
在接口中 MemoryCache
put
在类中 LimitedMemoryCache
public android.graphics.Bitmap get(String key)
MemoryCache
get
在接口中 MemoryCache
get
在类中 BaseMemoryCache
public android.graphics.Bitmap remove(String key)
MemoryCache
remove
在接口中 MemoryCache
remove
在类中 LimitedMemoryCache
public void clear()
MemoryCache
clear
在接口中 MemoryCache
clear
在类中 LimitedMemoryCache
protected int getSize(android.graphics.Bitmap value)
getSize
在类中 LimitedMemoryCache
protected android.graphics.Bitmap removeNext()
removeNext
在类中 LimitedMemoryCache
protected Reference<android.graphics.Bitmap> createReference(android.graphics.Bitmap value)
BaseMemoryCache
createReference
在类中 BaseMemoryCache