public class ReferenceMap<K,V> extends AbstractMap<K,V> implements Serializable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
ReferenceMap()
hashmap as weak map
|
ReferenceMap(boolean weak)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
protected Reference<V> |
createReference(V value,
ReferenceQueue<V> queue)
|
Set<Map.Entry<K,V>> |
entrySet()
Returns a copy of the key/values in the map at the point of calling.
|
V |
get(Object key) |
V |
put(K key,
V value) |
V |
remove(Object key) |
int |
size() |
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic ReferenceMap()
public ReferenceMap(boolean weak)
weak - if false, SoftReferences will be used on it's values.protected Reference<V> createReference(V value, ReferenceQueue<V> queue)
value - valuequeue - queueReference instancepublic void clear()
public int size()
Copyright © 2012–2018. All rights reserved.