Class SoftHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.pushingpixels.radiance.theming.internal.utils.SoftHashMap<K,V>
- All Implemented Interfaces:
Serializable, Map<K,V>
The original implementation is taken from The Java
Specialists' Newsletter [Issue 098] with permission of the original
author. Tweaked code by Endre Stolsvik was
contributed in December 2009.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<K, SoftHashMap.KeySoftReference<K, V>> The internal HashMap that will hold the SoftReference.private final ReferenceQueue<V> Reference queue for cleared SoftReference objects. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractMap
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, valuesMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
hash
The internal HashMap that will hold the SoftReference. -
queue
Reference queue for cleared SoftReference objects.
-
-
Constructor Details
-
SoftHashMap
SoftHashMap()
-
-
Method Details
-
get
-
expungeStaleEntries
private void expungeStaleEntries() -
put
-
remove
-
clear
-
size
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
entrySet
-