K - type of keys in this cacheV - type of values in this cachepublic class LHMCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
LHMCache(int max)Bounded cache with LRU eviction. |
| Modifier and Type | Method and Description |
|---|---|
LHMCache<K,V> | clone()Shallow clone. |
protected boolean | removeEldestEntry(Map.Entry<K,V> eldest)Evict eldest when over capacity. |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuescompute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size