WeakHashMap
. However, you can also specify hard keys and weak values, or any other combination. The default constructor uses hard keys and soft values, providing a memory-sensitive cache. This {@link Map} implementation does not allow null elements.Attempting to add a null key or value to the map will raise a NullPointerException
.
All the available iterators can be reset back to the start by casting to ResettableIterator
and calling reset()
.
This implementation is not synchronized. You can use {@link java.util.Collections#synchronizedMap} toprovide synchronized access to a ReferenceMap
.
@see java.lang.ref.Reference
@since 3.1 (extracted from ReferenceMap in 3.0)
@version $Id: AbstractReferenceMap.java 1477799 2013-04-30 19:56:11Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|