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 TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
protected void
Check for and remove references from the map which have become cleared.org.web3d.util.KeyedSoftReference
int
hashCode()
boolean
isEmpty()
keySet()
org.web3d.util.KeyedSoftReference
void
org.web3d.util.KeyedSoftReference
int
size()
Collection
<org.web3d.util.KeyedSoftReference> values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<Object,
org.web3d.util.KeyedSoftReference> - See Also:
-
containsValue
- Specified by:
containsValue
in 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
-