Package jadex.commons.collection
Class WeakObject<T>
- java.lang.Object
- 
- java.lang.ref.Reference<T>
- 
- java.lang.ref.WeakReference<T>
- 
- jadex.commons.collection.WeakObject<T>
 
 
 
- 
- Direct Known Subclasses:
- WeakEntry
 
 public class WeakObject<T> extends java.lang.ref.WeakReference<T>Weakreference has the disadvantage that it does not support transparent equals() and hashcode() methods. WeakObject provides this support.
- 
- 
Field SummaryFields Modifier and Type Field Description protected inthashcodeThe hash code.
 - 
Constructor SummaryConstructors Constructor Description WeakObject(T object)Construct a new reference.WeakObject(T obj, java.lang.ref.ReferenceQueue<? super T> queue)Construct a
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)Check the equality of an object with this.inthashCode()Return the hash code of the nested object.
 
- 
- 
- 
Constructor Detail- 
WeakObjectpublic WeakObject(T object) Construct a new reference.- Parameters:
- object- Object to reference.
 
 - 
WeakObjectpublic WeakObject(T obj, java.lang.ref.ReferenceQueue<? super T> queue) Construct a- Parameters:
- obj- Object to reference.
- queue- Reference queue.
 - 
Method Detail- 
equalspublic boolean equals(java.lang.Object object) Check the equality of an object with this.- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- object- Object to test equality with.
- Returns:
- True if object is equal.
 
 - 
hashCodepublic int hashCode() Return the hash code of the nested object.- Overrides:
- hashCodein class- java.lang.Object
- Returns:
- The hash code of the nested object.
 
 
- 
 
 
- 
 
-