Package org.jboss.util.collection
Class CompoundKey
- java.lang.Object
-
- org.jboss.util.collection.CompoundKey
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class CompoundKey extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
An immutable compound key class.- Version:
- $Revision$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object[]
elements
The elements of the keyprivate static long
serialVersionUID
The serialVersionUID
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serialVersionUID- See Also:
- Constant Field Values
-
elements
private final java.lang.Object[] elements
The elements of the key
-
-
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.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- Object to test equality with.- Returns:
- True if object is equal.
-
hashCode
public int hashCode()
Get the hash code of this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- Hash code.
-
toString
public java.lang.String toString()
Return a string representation of this object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this object.
-
clone
public java.lang.Object clone()
Return a shallow cloned copy of this object.- Overrides:
clone
in classjava.lang.Object
- Returns:
- Shallow cloned copy of this object.
-
-