public class LruMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Serializable, BoundedMap<K,V>
LinkedHashMap,
序列化表格AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 限定符和类型 | 字段和说明 |
|---|---|
private Map<K,V> |
delegate |
private Map<K,Object> |
keys |
private int |
maxSize |
private static long |
serialVersionUID |
| 构造器和说明 |
|---|
LruMap() |
LruMap(boolean sorted,
int maxSize) |
LruMap(boolean sorted,
int maxSize,
LruMapSupplier<K,Object> supplier) |
LruMap(int maxSize) |
LruMap(Map<K,V> delegate,
int maxSize) |
LruMap(Map<K,V> delegate,
int maxSize,
LruMapSupplier<K,Object> supplier) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
Map<K,V> |
getDelegate() |
int |
getMaxSize() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
V |
putIfAbsent(K key,
V value) |
V |
remove(Object key) |
int |
size() |
String |
toString() |
Collection<V> |
values() |
onEvictioncompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, isEmpty, merge, putAll, remove, replace, replace, replaceAllprivate static final long serialVersionUID
private final int maxSize
public LruMap()
public LruMap(int maxSize)
public LruMap(boolean sorted,
int maxSize)
public LruMap(boolean sorted,
int maxSize,
LruMapSupplier<K,Object> supplier)
public int getMaxSize()
getMaxSize 在接口中 BoundedMap<K,V>public boolean containsValue(Object value)
containsValue 在接口中 Map<K,V>containsValue 在类中 AbstractMap<K,V>public boolean containsKey(Object key)
containsKey 在接口中 Map<K,V>containsKey 在类中 AbstractMap<K,V>public Collection<V> values()
public Map<K,V> getDelegate()
getDelegate 在接口中 BoundedMap<K,V>public String toString()
toString 在类中 AbstractMap<K,V>Copyright © 2022. All rights reserved.