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 aKeyedValues2D
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
-
-
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 int
compareTo(KeyedValues2DItemKey<R,C> key)
boolean
equals(java.lang.Object obj)
Tests this key for equality with an arbitrary object.C
getColumnKey()
Returns the column key.R
getRowKey()
Returns the row key.int
hashCode()
java.lang.String
toJSONString()
Returns a JSON formatted string representing the key.java.lang.String
toString()
-
-
-
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:
equals
in classjava.lang.Object
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.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 interfaceItemKey
- Returns:
- A JSON formatted string.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-