com.go.trove.util
Class MultiKey

java.lang.Object
  |
  +--com.go.trove.util.MultiKey
All Implemented Interfaces:
java.io.Serializable

public class MultiKey
extends java.lang.Object
implements java.io.Serializable

MultiKey allows arrays and arrays of arrays to be used as hashtable keys. Hashcode computation and equality tests will fully recurse into the array elements. MultiKey can be used in conjunction with Depot for caching against complex keys.

Version:
4 , 01/07/09
Author:
Brian S O'Neill
See Also:
Pair, Serialized Form

Constructor Summary
MultiKey(java.lang.Object component)
          Contruct a new MultiKey against a component which may be any kind of object including an array, or an array of arrays, or null.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.Object getComponent()
          Returns the original component used to construct this MultiKey.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiKey

public MultiKey(java.lang.Object component)
Contruct a new MultiKey against a component which may be any kind of object including an array, or an array of arrays, or null.
Method Detail

getComponent

public java.lang.Object getComponent()
Returns the original component used to construct this MultiKey.

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

toString

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