Module platform

Class KeyedValues2DItemKey<R extends Comparable<R>,C extends Comparable<C>>

java.lang.Object
org.jfree.data.KeyedValues2DItemKey<R,C>
Type Parameters:
R - the row key type.
C - the column key type.
All Implemented Interfaces:
Serializable, Comparable<KeyedValues2DItemKey<R,C>>, ItemKey

public class KeyedValues2DItemKey<R extends Comparable<R>,C extends Comparable<C>> extends Object implements ItemKey, Comparable<KeyedValues2DItemKey<R,C>>, 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:
  • Constructor Details

    • 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 Details

    • 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 Comparable<R extends Comparable<R>>
    • equals

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

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

      public 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 String toString()
      Overrides:
      toString in class Object