Class KeyedValues2DItemKey<R extends java.lang.Comparable<R>,​C extends java.lang.Comparable<C>>

  • Type Parameters:
    R - the row key type.
    C - the column key type.
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<KeyedValues2DItemKey<R,​C>>, ItemKey

    public class KeyedValues2DItemKey<R extends java.lang.Comparable<R>,​C extends java.lang.Comparable<C>>
    extends java.lang.Object
    implements ItemKey, java.lang.Comparable<KeyedValues2DItemKey<R,​C>>, java.io.Serializable
    An object that references one data item in a KeyedValues2D data structure. Instances of this class are immutable (subject to the caller using series, row and column keys that are immutable).
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) C columnKey
      The column key.
      (package private) R rowKey
      The row key.
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyedValues2DItemKey​(R rowKey, C columnKey)
      Creates a new instance.
    • Field Detail

      • rowKey

        R extends java.lang.Comparable<R> rowKey
        The row key.
      • columnKey

        C extends java.lang.Comparable<C> columnKey
        The column key.
    • Constructor Detail

      • KeyedValues2DItemKey

        public KeyedValues2DItemKey​(R rowKey,
                                    C columnKey)
        Creates a new instance.
        Parameters:
        rowKey - the row key (null not permitted).
        columnKey - the column key (null not permitted).
    • Method Detail

      • getRowKey

        public R getRowKey()
        Returns the row key.
        Returns:
        The row key (never null).
      • getColumnKey

        public C getColumnKey()
        Returns the column key.
        Returns:
        The column key (never null).
      • compareTo

        public int compareTo​(KeyedValues2DItemKey<R,​C> key)
        Specified by:
        compareTo in interface java.lang.Comparable<R extends java.lang.Comparable<R>>
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this key for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • hashCode

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

        public java.lang.String toJSONString()
        Description copied from interface: ItemKey
        Returns a JSON formatted string representing the key.
        Specified by:
        toJSONString in interface ItemKey
        Returns:
        A JSON formatted string.
      • toString

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