[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.


Constuctor Index

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

Variables Index

O object
The Object wrapped by this HashWrapper.

Methods

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

Constructors

O HashWrapper
public HashWrapper(Object object);
Constructs a HashWrapper object that wraps the given Object.

Parameters:
the - base-level Object to be wrapped.

Variables

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

Methods

O 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

O 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

O 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