org.jboss.util.collection
Class CompoundKey

java.lang.Object
  extended byorg.jboss.util.collection.CompoundKey
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class CompoundKey
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

An immutable compound key class.

See Also:
Serialized Form

Constructor Summary
CompoundKey(java.lang.Object[] elements)
          Construct a CompoundKey.
CompoundKey(java.lang.Object a, java.lang.Object b)
          Construct a CompoundKey.
CompoundKey(java.lang.Object a, java.lang.Object b, java.lang.Object c)
          Construct a CompoundKey.
 
Method Summary
 java.lang.Object clone()
          Return a shallow cloned copy of this object.
 boolean equals(java.lang.Object obj)
          Test the equality of an object with this.
 int hashCode()
          Get the hash code of this object.
 java.lang.String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompoundKey

public CompoundKey(java.lang.Object[] elements)
Construct a CompoundKey.

Parameters:
elements - Elements of the key.

CompoundKey

public CompoundKey(java.lang.Object a,
                   java.lang.Object b)
Construct a CompoundKey.

Parameters:
a - Element.
b - Element.

CompoundKey

public CompoundKey(java.lang.Object a,
                   java.lang.Object b,
                   java.lang.Object c)
Construct a CompoundKey.

Parameters:
a - Element.
b - Element.
c - Element.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Test the equality of an object with this.

Parameters:
obj - Object to test equality with.
Returns:
True if object is equal.

hashCode

public int hashCode()
Get the hash code of this object.

Returns:
Hash code.

toString

public java.lang.String toString()
Return a string representation of this object.

Returns:
A string representation of this object.

clone

public java.lang.Object clone()
Return a shallow cloned copy of this object.

Returns:
Shallow cloned copy of this object.