[all packages]
[package BR.unicamp.Guarana]
[class hierarchy]
[index]
public class BR.unicamp.Guarana.HashWrapper
(source file: /home/lsd/oliva/src/java/guarana/kaffe/libraries/extensions/guarana/javalib/BR/unicamp/Guarana/HashWrapper.java)
java.lang.Object
|
+----BR.unicamp.Guarana.HashWrapper
The pure class interface.
public class HashWrapper
- This class is to be used for wrapping base-level Objects, when
they are used as keys in meta-level HashTables. The memory
address of the Object is used as its hashCode, and only references
are compared for equality.

HashWrapper(Object)
- Constructs a HashWrapper object that wraps the given Object.

object
- The Object wrapped by this HashWrapper.

equals(Object)
- Compares the references of the wrapped Object with the given
Object, assuming it may be a
hashCode()
- Returns the memory address of the Object.
toString()
- Returns a String representing the base-level Object.

HashWrapper
public HashWrapper(Object object);
- Constructs a HashWrapper object that wraps the given Object.
- Parameters:
- the - base-level Object to be wrapped.

object
public final Object object;
- The Object wrapped by this HashWrapper.

hashCode
public int hashCode();
- Returns the memory address of the Object.
- Returns:
- the result of Guarana.hashCode(this.object).
- Overrides:
- hashCode in class Object
- See also:
- hashCode
toString
public String toString();
- Returns a String representing the base-level Object.
- Returns:
- the result of Guarana.toString(this.object).
- Overrides:
- toString in class Object
- See also:
- toString
equals
public boolean equals(Object wrapper);
- Compares the references of the wrapped Object with the given
Object, assuming it may be a HashWrapper too.
- Parameters:
- wrapper - a HashWrapper or any Object
- Returns:
- true if the given Object is either the wrapped Object
or a HashWrapper that wraps it.
- Overrides:
- equals in class Object
[all packages]
[package BR.unicamp.Guarana]
[class hierarchy]
[index]
BR.unicamp.Guarana.HashWrapper.html