|
||||||||||
| 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.WeakReference
org.jboss.util.WeakObject
public final class WeakObject
Convenience class to wrap an Object into a WeakReference.
Modified from java.util.WeakHashMap.WeakKey.
| Field Summary | |
|---|---|
protected int |
hashCode
The hash code of the nested object |
| Constructor Summary | |
|---|---|
WeakObject(Object obj)
Construct a WeakObject. |
|
WeakObject(Object obj,
ReferenceQueue queue)
Construct a WeakObject. |
|
| Method Summary | |
|---|---|
static WeakObject |
create(Object obj)
Create a WeakObject for the given object. |
static WeakObject |
create(Object obj,
ReferenceQueue queue)
Create a WeakObject 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.Reference |
|---|
clear, enqueue, get, 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 WeakObject(Object obj)
obj - Object to reference.
public WeakObject(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 WeakObject create(Object obj)
obj - Object to reference.
public static WeakObject 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 | |||||||||