K - the keyV - the valuepublic class SmallLRUCache<K,V>
extends java.util.LinkedHashMap<K,V>
| Modifier and Type | Method and Description |
|---|---|
static <K,V> SmallLRUCache<K,V> |
newInstance(int size)
Create a new object with all elements of the given collection.
|
protected boolean |
removeEldestEntry(java.util.Map.Entry<K,V> eldest) |
void |
setMaxSize(int size) |
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, valuespublic static <K,V> SmallLRUCache<K,V> newInstance(int size)
K - the key typeV - the value typesize - the number of elementspublic void setMaxSize(int size)