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) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizepublic static <K,V> SmallLRUCache<K,V> newInstance(int size)
K - the key typeV - the value typesize - the number of elementspublic void setMaxSize(int size)