K - V - public class LRULinkedHashMap<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 构造器和说明 |
|---|
LRULinkedHashMap() |
| 限定符和类型 | 方法和说明 |
|---|---|
V |
get(Object key) |
Map.Entry<K,V> |
getHead()
获取首个元素
|
Map.Entry<K,V> |
getTail()
获取最后一个元素
时间复杂度O(n)
|
Map.Entry<K,V> |
getTailByReflection()
根据反射获取最后一个元素
时间复杂度O(1),访问tail属性
|
V |
put(K key,
V value) |
V |
remove(Object key) |
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, sizeequals, hashCode, toStringcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, sizeCopyright © 2019. All rights reserved.