public final class WeakObject extends 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(Object obj)
Construct a WeakObject.
|
WeakObject(Object obj,
ReferenceQueue queue)
Construct a WeakObject.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
clear, enqueue, get, isEnqueuedpublic WeakObject(Object obj)
obj - Object to reference.public WeakObject(Object obj, ReferenceQueue queue)
obj - Object to reference.queue - Reference queue.public boolean equals(Object obj)
public int hashCode()
public static WeakObject create(Object obj)
obj - Object to reference.public static WeakObject create(Object obj, ReferenceQueue queue)
obj - Object to reference.queue - Reference queue.Copyright © 2015 JBoss by Red Hat. All rights reserved.