org.openorb.util
Class IdentityKey

java.lang.Object
  |
  +--org.openorb.util.IdentityKey

public class IdentityKey
extends Object

Identity hash table key. Use to wrap objects to insert into hash maps where the entry should be hashed/looked up on the actual object, rather than any equals / hashCode operations it defines.

Author:
Chris Wood

Constructor Summary
IdentityKey(Object target)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Compare two instances of this class.
 int hashCode()
          Return the hash code of the internal object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityKey

public IdentityKey(Object target)
Constructor.
Parameters:
target - The target object to store in this instance.
Method Detail

hashCode

public int hashCode()
Return the hash code of the internal object.
Overrides:
hashCode in class Object
Returns:
A hash code for the internal object.

equals

public boolean equals(Object obj)
Compare two instances of this class.
Overrides:
equals in class Object
Parameters:
obj - Another IdentityKey instance.
Returns:
True if both are IdentityKey instances and the internal object is the same instance, false otherwise.