Package de.hybris.platform.util
Class WeakValueHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
de.hybris.platform.util.WeakValueHashMap<K,V>
- All Implemented Interfaces:
Serializable,Map<K,V>
A
Map implementation that maps keys to weakly referenced values. Keys in this map must be non-null Object objects.
Values must be non-null. See java.util.WeakHashMap in the Java API, which has weak keys instead of weak values.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected static classNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object p_key) booleanprotected WeakValueHashMap.MyWeakReference<V>createReference(K key, V value, ReferenceQueue<WeakValueHashMap.MyWeakReference<V>> refQueue) entrySet()booleanisEmpty()keySet()protected voidremoveReference(WeakValueHashMap.MyWeakReference<V> discarded) intsize()values()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
WeakValueHashMap
public WeakValueHashMap()
-
-
Method Details
-
size
public int size() -
entrySet
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classAbstractMap<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
get
-
put
-
createReference
protected WeakValueHashMap.MyWeakReference<V> createReference(K key, V value, ReferenceQueue<WeakValueHashMap.MyWeakReference<V>> refQueue) -
remove
-
clear
public void clear() -
keySet
-
values
-
isEmpty
public boolean isEmpty() -
removeReference
-