public final class WeakMapValue
extends java.lang.ref.WeakReference
Map value. The purpose of this class
is to aid the creation of memory-sensitive, canonical mappings.| Constructor and Description |
|---|
WeakMapValue(java.lang.Object key,
java.lang.Object value,
java.lang.ref.ReferenceQueue queue)
Constructs from a key and value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates if this instance equals another object.
|
java.lang.Object |
getKey()
Returns the key associated with this value.
|
java.lang.Object |
getValue()
Returns the value associated with this value.
|
int |
hashCode()
Returns the hash code of this instance.
|
public WeakMapValue(java.lang.Object key,
java.lang.Object value,
java.lang.ref.ReferenceQueue queue)
key - The key for the map.value - The value for the map.queue - The queue to receive garbaged-collected
instances of this class.java.lang.NullPointerException - if the queue is null.public final java.lang.Object getKey()
public final java.lang.Object getValue()
null if this reference object has been
cleared by the program or garbage collector.null.public boolean equals(java.lang.Object obj)
null or equal.equals in class java.lang.Objectobj - The other object.public int hashCode()
hashCode in class java.lang.Object