public abstract class LimitedMemoryCache extends BaseMemoryCache
getSizeLimit()
).BaseMemoryCache
Constructor and Description |
---|
LimitedMemoryCache(int sizeLimit) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all items from cache
|
protected abstract int |
getSize(android.graphics.Bitmap value) |
protected int |
getSizeLimit() |
boolean |
put(java.lang.String key,
android.graphics.Bitmap value)
Puts value into cache by key
|
android.graphics.Bitmap |
remove(java.lang.String key)
Removes item by key
|
protected abstract android.graphics.Bitmap |
removeNext() |
createReference, get, keys
public LimitedMemoryCache(int sizeLimit)
sizeLimit
- Maximum size for cache (in bytes)public boolean put(java.lang.String key, android.graphics.Bitmap value)
MemoryCache
put
in interface MemoryCache
put
in class BaseMemoryCache
public android.graphics.Bitmap remove(java.lang.String key)
MemoryCache
remove
in interface MemoryCache
remove
in class BaseMemoryCache
public void clear()
MemoryCache
clear
in interface MemoryCache
clear
in class BaseMemoryCache
protected int getSizeLimit()
protected abstract int getSize(android.graphics.Bitmap value)
protected abstract android.graphics.Bitmap removeNext()