Class 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 key
      private 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.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 class java.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 class java.lang.Object
        Returns:
        Hash code.
      • toString

        public java.lang.String toString()
        Return a string representation of this object.
        Overrides:
        toString in class java.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 class java.lang.Object
        Returns:
        Shallow cloned copy of this object.