public final class LRUCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
LRUCache(int maxCacheSize) |
LRUCache(int maxCacheSize,
int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfirstEntry, lastEntry, pollFirstEntry, pollLastEntrypublic LRUCache(int maxCacheSize)
public LRUCache(int maxCacheSize,
int initialCapacity)
protected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry in class LinkedHashMap<K,V>