public class LRUCache<K,V> extends LinkedHashMap<K,ValueObject<K,V>> implements Cache<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
void |
clearValues() |
ValueObject<K,V> |
get(Object key) |
int |
getMaxSize() |
V |
getValue(K key) |
boolean |
isEmpty() |
boolean |
isFull() |
Iterator<Map.Entry<K,V>> |
iterator() |
ValueObject<K,V> |
put(K key,
ValueObject<K,V> value) |
void |
putAll(Map<? extends K,? extends ValueObject<K,V>> m) |
void |
putValue(K key,
V value) |
void |
putValues(Cache<K,V> cache) |
ValueObject<K,V> |
remove(Object key) |
protected boolean |
removeEldestEntry(Map.Entry<K,ValueObject<K,V>> eldest) |
V |
removeValue(K key) |
int |
size() |
containsValue, entrySet, forEach, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, putIfAbsent, remove, replace, replaceequals, hashCode, toStringforEach, spliteratorcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, merge, putIfAbsent, remove, replace, replaceprotected boolean removeEldestEntry(Map.Entry<K,ValueObject<K,V>> eldest)
removeEldestEntry 在类中 LinkedHashMap<K,ValueObject<K,V>>public int getMaxSize()
public int size()
public ValueObject<K,V> get(Object key)
get 在接口中 Map<K,ValueObject<K,V>>get 在类中 LinkedHashMap<K,ValueObject<K,V>>public boolean isEmpty()
public ValueObject<K,V> put(K key, ValueObject<K,V> value)
public void putAll(Map<? extends K,? extends ValueObject<K,V>> m)
public ValueObject<K,V> remove(Object key)
public void clearValues()
clearValues 在接口中 Cache<K,V>public void clear()
clear 在接口中 Map<K,ValueObject<K,V>>clear 在类中 LinkedHashMap<K,ValueObject<K,V>>Copyright © 2019. All rights reserved.