public final class WeakObject
extends java.lang.ref.WeakReference
Modified from java.util.WeakHashMap.WeakKey.
| Modifier and Type | Field and Description |
|---|---|
protected int |
hashCode
The hash code of the nested object
|
| Constructor and Description |
|---|
WeakObject(java.lang.Object obj)
Construct a WeakObject.
|
WeakObject(java.lang.Object obj,
java.lang.ref.ReferenceQueue queue)
Construct a WeakObject.
|
| Modifier and Type | Method and Description |
|---|---|
static WeakObject |
create(java.lang.Object obj)
Create a WeakObject for the given object.
|
static WeakObject |
create(java.lang.Object obj,
java.lang.ref.ReferenceQueue queue)
Create a WeakObject for the given object.
|
boolean |
equals(java.lang.Object obj)
Check the equality of an object with this.
|
int |
hashCode()
Return the hash code of the nested object.
|
public WeakObject(java.lang.Object obj)
obj - Object to reference.public WeakObject(java.lang.Object obj,
java.lang.ref.ReferenceQueue queue)
obj - Object to reference.queue - Reference queue.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Object to test equality with.public int hashCode()
hashCode in class java.lang.Objectpublic static WeakObject create(java.lang.Object obj)
obj - Object to reference.public static WeakObject create(java.lang.Object obj, java.lang.ref.ReferenceQueue queue)
obj - Object to reference.queue - Reference queue.