Package jadex.collection
Class WeakObject<T>
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference<T>
jadex.collection.WeakObject<T>
- Direct Known Subclasses:
WeakEntry
Weakreference has the disadvantage that it does not support
transparent equals() and hashcode() methods.
WeakObject provides this support.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWeakObject
(T object) Construct a new reference.WeakObject
(T obj, ReferenceQueue<? super T> queue) Construct a WeakObject. -
Method Summary
Methods inherited from class java.lang.ref.Reference
clear, clone, enqueue, get, isEnqueued, reachabilityFence, refersTo
-
Field Details
-
hashcode
protected final int hashcodeThe hash code.
-
-
Constructor Details
-
WeakObject
Construct a new reference.- Parameters:
object
- Object to reference.
-
WeakObject
Construct a WeakObject.- Parameters:
obj
- Object to reference.queue
- Reference queue.
-
-
Method Details
-
equals
Check the equality of an object with this. -
hashCode
public int hashCode()Return the hash code of the nested object.
-