Jadex 0.941

jadex.util
Class WeakObject

java.lang.Object
  extended byjava.lang.ref.Reference
      extended byjava.lang.ref.WeakReference
          extended byjadex.util.WeakObject
All Implemented Interfaces:
Serializable

public final class WeakObject
extends WeakReference
implements Serializable

Weakreference has the disadvantage that it does not support transparent equals() and hashcode() methods. WeakObject provides this support.

See Also:
Serialized Form

Constructor Summary
WeakObject(Object object)
          Construct a new reference.
WeakObject(Object obj, ReferenceQueue queue)
          Construct a WeakObject.
 
Method Summary
 boolean equals(Object object)
          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
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeakObject

public WeakObject(Object object)
Construct a new reference.

Parameters:
object - Object to reference.

WeakObject

public WeakObject(Object obj,
                  ReferenceQueue queue)
Construct a WeakObject.

Parameters:
obj - Object to reference.
queue - Reference queue.
Method Detail

equals

public boolean equals(Object object)
Check the equality of an object with this.

Parameters:
object - Object to test equality with.
Returns:
True if object is equal.

hashCode

public int hashCode()
Return the hash code of the nested object.

Returns:
The hash code of the nested object.

Jadex 0.941

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2005 Lars Braubach, Alexander Pokahr, Andrzej Walczak - University of Hamburg. Use is subject to license terms.