K - the key typeV - the val typepublic class LRUCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
V |
get(Object key) |
int |
getMaxSize() |
V |
put(K key,
V value) |
V |
remove(Object key) |
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest) |
void |
setMaxSize(int maxSize) |
int |
size() |
containsValue, entrySet, forEach, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putAll, putIfAbsent, remove, replace, replaceequals, hashCode, toStringcompute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replaceprotected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry 在类中 LinkedHashMap<K,V>public boolean containsKey(Object key)
containsKey 在接口中 Map<K,V>containsKey 在类中 HashMap<K,V>public int getMaxSize()
public void setMaxSize(int maxSize)
Copyright © 2023. All rights reserved.