Package com.pnfsoftware.jeb.util.collect
Class WeakValueMap<K,V>
java.lang.Object
com.pnfsoftware.jeb.util.collect.WeakValueMap<K,V>
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
Map<K,
V>
A map whose values (and only the values, not the keys) do not prevent garbage collection of
entries. The "opposite" of
WeakHashMap
. Key-value pairs with a null value should not be
inserted to this map; no guarantee on retrieval and persistence is provided for null values.
This map object supports serializability. It is serializable if its key and value types are also serializable.
- See Also:
-
WeakHashMap
WeakKeyValueMap
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionWeakValueMap
(int initialCapacity) WeakValueMap
(int initialCapacity, float loadFactor) WeakValueMap
(Map<K, V> t) -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
WeakValueMap
public WeakValueMap(int initialCapacity, float loadFactor) -
WeakValueMap
public WeakValueMap(int initialCapacity) -
WeakValueMap
public WeakValueMap() -
WeakValueMap
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
hashCode
public int hashCode() -
equals
-
toString
-