K - V - public class LRUCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 构造器和说明 |
|---|
LRUCache(int maxCapacity) |
| 限定符和类型 | 方法和说明 |
|---|---|
V |
get(Object key) |
V |
put(K key,
V value)
可以根据实际情况,考虑对不同的操作加锁
|
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest) |
clear, containsValue, entrySet, forEach, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, sizeprotected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry 在类中 LinkedHashMap<K,V>Copyright © 2013–2021 AJAXJS. All rights reserved.