K - the keyV - the valuepublic class SmallLRUCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 限定符和类型 | 方法和说明 |
|---|---|
static <K,V> SmallLRUCache<K,V> |
newInstance(int size)
Create a new object with all elements of the given collection.
|
protected boolean |
removeEldestEntry(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, sizeequals, hashCode, toStringcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, 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)
protected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry 在类中 LinkedHashMap<K,V>Copyright © 2022. All rights reserved.