Package org.web3d.util
Class SoftValueHashMap
java.lang.Object
org.web3d.util.SoftValueHashMap
public class SoftValueHashMap
extends Object
implements Map<Object,org.web3d.util.KeyedSoftReference>
An extension of HashMap which stores soft references to the values
in the hash map.
Like it says in the documentation for WeakHashMap, this class breaks several immutability assumptions that are assumed for HashMap, since values will be disappearing at random.
- Version:
- $Revision: 1.2 $
- Author:
- Brad Vender
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanprotected voidCheck for and remove references from the map which have become cleared.org.web3d.util.KeyedSoftReferenceinthashCode()booleanisEmpty()keySet()org.web3d.util.KeyedSoftReferencevoidorg.web3d.util.KeyedSoftReferenceintsize()Collection<org.web3d.util.KeyedSoftReference> values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
SoftValueHashMap
public SoftValueHashMap()
-
-
Method Details
-
clear
-
containsKey
- Specified by:
containsKeyin interfaceMap<Object,org.web3d.util.KeyedSoftReference> - See Also:
-
containsValue
- Specified by:
containsValuein interfaceMap<Object,org.web3d.util.KeyedSoftReference> - See Also:
-
entrySet
-
equals
-
flushEmptyReferences
protected void flushEmptyReferences()Check for and remove references from the map which have become cleared. -
get
-
hashCode
-
isEmpty
-
keySet
-
put
-
putAll
-
remove
-
size
-
values
-