com.orsoncharts.data

## Interface KeyedValues2D<T>

- Type Parameters:
    `T` - The value type.
  All Superinterfaces:
    Values2D<T>
  All Known Implementing Classes:
    DefaultKeyedValues2D

      public interface KeyedValues2D<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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getColumnIndex(java.lang.Comparable<?> columnKey)` Returns the index of the specified key, or `-1` if there is no such key.
    `java.lang.Comparable<?>` | `getColumnKey(int columnIndex)` Returns the column key with the specified index.
    `java.util.List<java.lang.Comparable<?>>` | `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).
    `int` | `getRowIndex(java.lang.Comparable<?> rowKey)` Returns the index of the specified key, or `-1` if there is no such key.
    `java.lang.Comparable<?>` | `getRowKey(int rowIndex)` Returns the row key with the specified index.
    `java.util.List<java.lang.Comparable<?>>` | `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).
    `T` | `getValue(java.lang.Comparable<?> rowKey, java.lang.Comparable<?> columnKey)` Returns the value (possibly `null`) associated with the specified keys.

    - ### Methods inherited from interface com.orsoncharts.data.Values2D

      `getColumnCount, getDoubleValue, getRowCount, getValue`

- - ### Method Detail

    - #### getRowKey

          java.lang.Comparable<?> getRowKey(int rowIndex)

      Returns the row key with the specified index.
      Parameters:
        `rowIndex` - the row index.
      Returns:
        The key.

    - #### getColumnKey

          java.lang.Comparable<?> getColumnKey(int columnIndex)

      Returns the column key with the specified index.
      Parameters:
        `columnIndex` - the index.
      Returns:
        The key.

    - #### getRowIndex

          int getRowIndex(java.lang.Comparable<?> 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(java.lang.Comparable<?> 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

          java.util.List<java.lang.Comparable<?>> 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

          java.util.List<java.lang.Comparable<?>> 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(java.lang.Comparable<?> rowKey,
                     java.lang.Comparable<?> 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`).