public static class WeakSoftTable.WeakKey extends WeakReference implements WeakSoftTable.RemovableReference
Modifier | Constructor and Description |
---|---|
|
WeakKey(Object key)
Creates a key that holds a weak reference to the argument and
compares it using ==.
|
protected |
WeakKey(WeakSoftTable.WeakKey weakKey,
ReferenceQueue queue)
Creates a copy of the key registered with the queue.
|
Modifier and Type | Method and Description |
---|---|
void |
cleared(Map map)
Called with the containing map when this instance's reference is
cleared, to remove the associated entry from the map.
|
WeakSoftTable.RemovableReference |
copy(ReferenceQueue queue)
Returns a copy of this instance registered with the specified queue.
|
boolean |
equals(Object o)
Returns true if the argument is an instance of the same concrete
class, and if both objects had null keys, or if neither object has
had its weak key cleared and their values are ==.
|
int |
hashCode() |
clear, enqueue, get, isEnqueued
public WeakKey(Object key)
protected WeakKey(WeakSoftTable.WeakKey weakKey, ReferenceQueue queue)
public WeakSoftTable.RemovableReference copy(ReferenceQueue queue)
WeakSoftTable.RemovableReference
copy
in interface WeakSoftTable.RemovableReference
queue
- the queue with which this instance should be registeredpublic void cleared(Map map)
WeakSoftTable.RemovableReference
cleared
in interface WeakSoftTable.RemovableReference
map
- the map from which this newly cleared instance should be
removedCopyright © 2016–2018. All rights reserved.