|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ref.Reference<T>
java.lang.ref.WeakReference
visad.util.WeakMapValue
public final class WeakMapValue
A weakly-referenced Map
value. The purpose of this class
is to aid the creation of memory-sensitive, canonical mappings.
Constructor Summary | |
---|---|
WeakMapValue(Object key,
Object value,
ReferenceQueue queue)
Constructs from a key and value. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Indicates if this instance equals another object. |
Object |
getKey()
Returns the key associated with this value. |
Object |
getValue()
Returns the value associated with this value. |
int |
hashCode()
Returns the hash code of this instance. |
Methods inherited from class java.lang.ref.Reference |
---|
clear, enqueue, get, isEnqueued |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WeakMapValue(Object key, Object value, 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.
NullPointerException
- if the queue is null
.Method Detail |
---|
public final Object getKey()
public final Object getValue()
null
if this reference object has been
cleared by the program or garbage collector.
null
.public boolean equals(Object obj)
null
or equal.
equals
in class Object
obj
- The other object.
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |