public final class SoftObject
extends java.lang.ref.SoftReference
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 |
|---|
SoftObject(java.lang.Object obj)
Construct a SoftObject.
|
SoftObject(java.lang.Object obj,
java.lang.ref.ReferenceQueue queue)
Construct a SoftObject.
|
| Modifier and Type | Method and Description |
|---|---|
static SoftObject |
create(java.lang.Object obj)
Create a SoftObject for the given object.
|
static SoftObject |
create(java.lang.Object obj,
java.lang.ref.ReferenceQueue queue)
Create a SoftObject 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 SoftObject(java.lang.Object obj)
obj - Object to reference.public SoftObject(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 SoftObject create(java.lang.Object obj)
obj - Object to reference.public static SoftObject create(java.lang.Object obj, java.lang.ref.ReferenceQueue queue)
obj - Object to reference.queue - Reference queue.