|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ref.Reference<T>
java.lang.ref.SoftReference
org.jboss.util.SoftObject
public final class SoftObject
Convenience class to wrap an Object into a SoftReference.
Modified from java.util.WeakHashMap.WeakKey.
| Field Summary | |
|---|---|
protected int |
hashCode
The hash code of the nested object |
| Constructor Summary | |
|---|---|
SoftObject(Object obj)
Construct a SoftObject. |
|
SoftObject(Object obj,
ReferenceQueue queue)
Construct a SoftObject. |
|
| Method Summary | |
|---|---|
static SoftObject |
create(Object obj)
Create a SoftObject for the given object. |
static SoftObject |
create(Object obj,
ReferenceQueue queue)
Create a SoftObject for the given object. |
boolean |
equals(Object obj)
Check the equality of an object with this. |
int |
hashCode()
Return the hash code of the nested object. |
| 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 |
| Field Detail |
|---|
protected final int hashCode
| Constructor Detail |
|---|
public SoftObject(Object obj)
obj - Object to reference.
public SoftObject(Object obj,
ReferenceQueue queue)
obj - Object to reference.queue - Reference queue.| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectobj - Object to test equality with.
public int hashCode()
hashCode in class Objectpublic static SoftObject create(Object obj)
obj - Object to reference.
public static SoftObject create(Object obj,
ReferenceQueue queue)
obj - Object to reference.queue - Reference queue.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||