public class ConcurrentBoundedMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Serializable, BoundedMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 限定符和类型 | 字段和说明 |
|---|---|
private Map<K,V> |
delegate |
private Queue<K> |
keys |
private int |
maxSize |
private static long |
serialVersionUID |
| 限定符 | 构造器和说明 |
|---|---|
|
ConcurrentBoundedMap(int maxSize) |
|
ConcurrentBoundedMap(Map<K,V> delegate,
int maxSize) |
protected |
ConcurrentBoundedMap(Map<K,V> delegate,
int maxSize,
Queue<K> keys) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
private void |
ensureCapacity(K key) |
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 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 String toString()
toString 在类中 AbstractMap<K,V>public int getMaxSize()
getMaxSize 在接口中 BoundedMap<K,V>public Map<K,V> getDelegate()
getDelegate 在接口中 BoundedMap<K,V>private void ensureCapacity(K key)
Copyright © 2022. All rights reserved.