Jadex 0.96-beta1

jadex.util
Class WeakObject

java.lang.Object
  extended by java.lang.ref.Reference
      extended by java.lang.ref.WeakReference
          extended by jadex.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.

Overrides:
equals in class Object
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.

Overrides:
hashCode in class Object
Returns:
The hash code of the nested object.

Jadex 0.96-beta1

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-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.