com.openharbor.beck.map
Class HashableSoftReference
java.lang.Object
java.lang.ref.Reference
java.lang.ref.SoftReference
com.openharbor.beck.map.HashableSoftReference
- public class HashableSoftReference
- extends java.lang.ref.SoftReference
A SoftReference that can be used as a key in a HashMap.
The hashCode and equals methods delegate to the referent.
Garbage collection doesn't cause the hashCode to change
(assuming the referent's hashCode doesn't change).
Methods inherited from class java.lang.ref.SoftReference |
get |
Methods inherited from class java.lang.ref.Reference |
clear, enqueue, isEnqueued |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
HashableSoftReference
public HashableSoftReference(java.lang.Object referent)
throws java.lang.NullPointerException
- Throws:
java.lang.NullPointerException
- if referent == null.
HashableSoftReference
public HashableSoftReference(java.lang.Object referent,
java.lang.ref.ReferenceQueue epitaph)
throws java.lang.NullPointerException
- Throws:
java.lang.NullPointerException
- if referent == null.
hashCode
public int hashCode()
equals
public boolean equals(java.lang.Object that)