|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ref.Reference<T> java.lang.ref.WeakReference com.sun.jini.collection.WeakKeyReference
public class WeakKeyReference
A weak reference to a key in a table. Its hash code is that of its
key at the time of the reference's creation. Its
equals
method will compare itself to another
WeakKeyReference
, or to another object that is then
compared to the key held by this reference.
This class is public so that it can be used in other tables for
which WeakTable
won't work.
Constructor Summary | |
---|---|
WeakKeyReference(Object key)
Create a new WeakReference to the given key. |
|
WeakKeyReference(Object key,
ReferenceQueue refQueue)
Create a new WeakReference to the given key, placing
the cleared reference on the specified ReferenceQueue . |
Method Summary | |
---|---|
boolean |
equals(Object other)
Equivalence for WeakKeyReference is defined as follows: If the other reference is to this object, return true . |
int |
hashCode()
Return the key's hashCode remembered from the time of reference creation. |
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 WeakKeyReference(Object key)
WeakReference
to the given key. The
reference is placed on no queue.
public WeakKeyReference(Object key, ReferenceQueue refQueue)
WeakReference
to the given key, placing
the cleared reference on the specified ReferenceQueue
.
Method Detail |
---|
public int hashCode()
WeakKeyReference
for that new table.
hashCode
in class Object
public boolean equals(Object other)
true
.
false
.
false
if the other's key is cleared; otherwise return
the result of invoking equals
on the two keys.
equals
in class Object
|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |