Package org.jfree.data
Class KeyedValues2DItemKey<R extends java.lang.Comparable<R>,C extends java.lang.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:
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 aKeyedValues2Ddata structure. Instances of this class are immutable (subject to the caller using series, row and column keys that are immutable).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyedValues2DItemKey(R rowKey, C columnKey)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(KeyedValues2DItemKey<R,C> key)booleanequals(java.lang.Object obj)Tests this key for equality with an arbitrary object.CgetColumnKey()Returns the column key.RgetRowKey()Returns the row key.inthashCode()java.lang.StringtoJSONString()Returns a JSON formatted string representing the key.java.lang.StringtoString()
-
-
-
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)
-
equals
public boolean equals(java.lang.Object obj)
Tests this key for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toJSONString
public java.lang.String toJSONString()
Description copied from interface:ItemKeyReturns a JSON formatted string representing the key.- Specified by:
toJSONStringin interfaceItemKey- Returns:
- A JSON formatted string.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-