Interface KeyedValues2D<R extends Comparable<R>,C extends Comparable<C>,T>

Type Parameters:
R - The row key type.
C - The column key type.
T - The value type.
All Superinterfaces:
Values2D<T>
All Known Implementing Classes:
DefaultKeyedValues2D

public interface KeyedValues2D<R extends Comparable<R>,C extends Comparable<C>,T> extends Values2D<T>
A two dimensional grid of data values where each value is uniquely identified by two keys (the rowKey and the columnKey). Any instance of Comparable can be used as a key (String objects are instances of Comparable, making them convenient key objects).
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getColumnIndex(C columnKey)
    Returns the index of the specified key, or -1 if there is no such key.
    getColumnKey(int columnIndex)
    Returns the column key with the specified index.
    Returns a list of the column keys (the order is significant, since data values can be accessed by index as well as by key).
    int
    getRowIndex(R rowKey)
    Returns the index of the specified key, or -1 if there is no such key.
    getRowKey(int rowIndex)
    Returns the row key with the specified index.
    Returns a list of the row keys (the order is significant, since data values can be accessed by index as well as by key).
    getValue(R rowKey, C columnKey)
    Returns the value (possibly null) associated with the specified keys.

    Methods inherited from interface org.jfree.chart3d.data.Values2D

    getColumnCount, getDoubleValue, getRowCount, getValue
  • Method Details

    • getRowKey

      R getRowKey(int rowIndex)
      Returns the row key with the specified index.
      Parameters:
      rowIndex - the row index.
      Returns:
      The key.
    • getColumnKey

      C getColumnKey(int columnIndex)
      Returns the column key with the specified index.
      Parameters:
      columnIndex - the index.
      Returns:
      The key.
    • getRowIndex

      int getRowIndex(R rowKey)
      Returns the index of the specified key, or -1 if there is no such key.
      Parameters:
      rowKey - the row key (null not permitted).
      Returns:
      The index, or -1.
    • getColumnIndex

      int getColumnIndex(C columnKey)
      Returns the index of the specified key, or -1 if there is no such key.
      Parameters:
      columnKey - the column key (null not permitted).
      Returns:
      The index, or -1.
    • getRowKeys

      Returns a list of the row keys (the order is significant, since data values can be accessed by index as well as by key).

      NOTE: this method must be implemented so that modifications to the returned list do not impact the underlying data structure.
      Returns:
      A list of row keys.
    • getColumnKeys

      Returns a list of the column keys (the order is significant, since data values can be accessed by index as well as by key).

      NOTE: this method must be implemented so that modifications to the returned list do not impact the underlying data structure.
      Returns:
      A list of column keys.
    • getValue

      T getValue(R rowKey, C columnKey)
      Returns the value (possibly null) associated with the specified keys. If either or both of the keys is not defined in this data structure, a runtime exception will be thrown.
      Parameters:
      rowKey - the row key (null not permitted).
      columnKey - the column key (null not permitted).
      Returns:
      The value (possibly null).