net.sf.swan.util
Class IdentityKey

java.lang.Object
  |
  +--net.sf.swan.util.IdentityKey
All Implemented Interfaces:
java.lang.Cloneable

public final class IdentityKey
extends java.lang.Object
implements java.lang.Cloneable

Map key implementation that compares based on object identity.


Constructor Summary
IdentityKey()
           
IdentityKey(java.lang.Object target)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object other)
           
 int hashCode()
           
 void reset(java.lang.Object newTarget)
          Reset the key.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentityKey

public IdentityKey()

IdentityKey

public IdentityKey(java.lang.Object target)
Method Detail

reset

public void reset(java.lang.Object newTarget)
Reset the key. This should never be called on a key that is being used by a Map. This method is simply to permit reuse of key objects for searching.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object