com.orsoncharts.data

## Class DefaultKeyedValues3D<V>

- java.lang.Object
- - com.orsoncharts.data.DefaultKeyedValues3D<V>

- All Implemented Interfaces:
    KeyedValues3D<V>, Values3D<V>, java.io.Serializable

      public final class DefaultKeyedValues3D<V>
      extends java.lang.Object
      implements KeyedValues3D<V>, java.io.Serializable

  A three dimensional table of numerical values, implementing the `KeyedValues3D` interface.
  NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultKeyedValues3D()` Creates a new (empty) table.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)` Tests this instance for equality with an arbitrary object.
    `int` | `getColumnCount()` Returns the number of items in the z-dimension.
    `int` | `getColumnIndex(java.lang.Comparable<?> columnKey)` Returns the index for the specified column key, or `-1` if the key is not present in this data structure.
    `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 for the data.
    `double` | `getDoubleValue(int seriesIndex, int rowIndex, int columnIndex)` Returns the data item at the specified position as a double primitive.
    `int` | `getRowCount()` Returns the number of items in the y-dimension.
    `int` | `getRowIndex(java.lang.Comparable<?> rowKey)` Returns the index for the specified row key, or `-1` if the key is not present in this data structure.
    `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 for the data.
    `int` | `getSeriesCount()` Returns the number of items in the x-dimension.
    `int` | `getSeriesIndex(java.lang.Comparable<?> seriesKey)` Returns the index for the specified series key, or `-1` if the key is not present in this data structure.
    `java.lang.Comparable<?>` | `getSeriesKey(int seriesIndex)` Returns the series key with the specified index.
    `java.util.List<java.lang.Comparable<?>>` | `getSeriesKeys()` Returns a list of the series keys for the data.
    `V` | `getValue(java.lang.Comparable<?> seriesKey, java.lang.Comparable<?> rowKey, java.lang.Comparable<?> columnKey)` Returns the value for the specified data item.
    `V` | `getValue(int seriesIndex, int rowIndex, int columnIndex)` Returns the data item at the specified position.
    `void` | `setValue(V n, java.lang.Comparable<?> seriesKey, java.lang.Comparable<?> rowKey, java.lang.Comparable<?> columnKey)` Sets the value for an item in a series, overwriting any existing value.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultKeyedValues3D

          public DefaultKeyedValues3D()

      Creates a new (empty) table.

  - ### Method Detail

    - #### getSeriesKey

          public java.lang.Comparable<?> getSeriesKey(int seriesIndex)

      Returns the series key with the specified index.
      Specified by:
        `getSeriesKey` in interface `KeyedValues3D<V>`
      Parameters:
        `seriesIndex` - the series index.
      Returns:
        The series key.

    - #### getRowKey

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

      Returns the row key with the specified index.
      Specified by:
        `getRowKey` in interface `KeyedValues3D<V>`
      Parameters:
        `rowIndex` - the row index.
      Returns:
        The row key.

    - #### getColumnKey

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

      Returns the column key with the specified index.
      Specified by:
        `getColumnKey` in interface `KeyedValues3D<V>`
      Parameters:
        `columnIndex` - the column index.
      Returns:
        The column key.

    - #### getSeriesIndex

          public int getSeriesIndex(java.lang.Comparable<?> seriesKey)

      Returns the index for the specified series key, or `-1` if the key is not present in this data structure.
      Specified by:
        `getSeriesIndex` in interface `KeyedValues3D<V>`
      Parameters:
        `seriesKey` - the series key (`null` not permitted).
      Returns:
        The series index or `-1`.

    - #### getRowIndex

          public int getRowIndex(java.lang.Comparable<?> rowKey)

      Returns the index for the specified row key, or `-1` if the key is not present in this data structure.
      Specified by:
        `getRowIndex` in interface `KeyedValues3D<V>`
      Parameters:
        `rowKey` - the row key (`null` not permitted).
      Returns:
        The row index or `-1`.

    - #### getColumnIndex

          public int getColumnIndex(java.lang.Comparable<?> columnKey)

      Returns the index for the specified column key, or `-1` if the key is not present in this data structure.
      Specified by:
        `getColumnIndex` in interface `KeyedValues3D<V>`
      Parameters:
        `columnKey` - the column key (`null` not permitted).
      Returns:
        The column index or `-1`.

    - #### getSeriesKeys

          public java.util.List<java.lang.Comparable<?>> getSeriesKeys()

      Returns a list of the series keys for the data. Modifying this list will have no impact on the underlying data.
      Specified by:
        `getSeriesKeys` in interface `KeyedValues3D<V>`
      Returns:
        A list of the series keys (possibly empty, but never `null`).

    - #### getRowKeys

          public java.util.List<java.lang.Comparable<?>> getRowKeys()

      Returns a list of the row keys for the data. Modifying this list will have no impact on the underlying data.
      Specified by:
        `getRowKeys` in interface `KeyedValues3D<V>`
      Returns:
        A list of the row keys (possibly empty, but never `null`).

    - #### getColumnKeys

          public java.util.List<java.lang.Comparable<?>> getColumnKeys()

      Returns a list of the column keys for the data. Modifying this list will have no impact on the underlying data.
      Specified by:
        `getColumnKeys` in interface `KeyedValues3D<V>`
      Returns:
        A list of the column keys (possibly empty, but never `null`).

    - #### getSeriesCount

          public int getSeriesCount()

      Description copied from interface: `Values3D`
      Returns the number of items in the x-dimension.
      Specified by:
        `getSeriesCount` in interface `Values3D<V>`
      Returns:
        The number of items in the x-dimension.

    - #### getRowCount

          public int getRowCount()

      Description copied from interface: `Values3D`
      Returns the number of items in the y-dimension.
      Specified by:
        `getRowCount` in interface `Values3D<V>`
      Returns:
        The number of items in the y-dimension.

    - #### getColumnCount

          public int getColumnCount()

      Description copied from interface: `Values3D`
      Returns the number of items in the z-dimension.
      Specified by:
        `getColumnCount` in interface `Values3D<V>`
      Returns:
        The number of items in the z-dimension.

    - #### getValue

          public V getValue(int seriesIndex,
                            int rowIndex,
                            int columnIndex)

      Description copied from interface: `Values3D`
      Returns the data item at the specified position.
      Specified by:
        `getValue` in interface `Values3D<V>`
      Parameters:
        `seriesIndex` - the series-index.
        `rowIndex` - the row-index.
        `columnIndex` - the column-index.
      Returns:
        The data value (possibly `null`).

    - #### getValue

          public V getValue(java.lang.Comparable<?> seriesKey,
                            java.lang.Comparable<?> rowKey,
                            java.lang.Comparable<?> columnKey)

      Returns the value for the specified data item. This method will throw an `IllegalArgumentException` if the dataset does not contain the specified keys.
      Specified by:
        `getValue` in interface `KeyedValues3D<V>`
      Parameters:
        `seriesKey` - the series key (`null` not permitted).
        `rowKey` - the row key (`null` not permitted).
        `columnKey` - the column key (`null` not permitted).
      Returns:
        The value (possibly `null`).

    - #### getDoubleValue

          public double getDoubleValue(int seriesIndex,
                                       int rowIndex,
                                       int columnIndex)

      Description copied from interface: `Values3D`
      Returns the data item at the specified position as a double primitive. Where the `Values3D.getValue(int, int, int)` method returns `null`, this method returns `Double.NaN`.
      Specified by:
        `getDoubleValue` in interface `Values3D<V>`
      Parameters:
        `seriesIndex` - the series index.
        `rowIndex` - the row index.
        `columnIndex` - the column index.
      Returns:
        The data value.

    - #### setValue

          public void setValue(V n,
                               java.lang.Comparable<?> seriesKey,
                               java.lang.Comparable<?> rowKey,
                               java.lang.Comparable<?> columnKey)

      Sets the value for an item in a series, overwriting any existing value.
      Parameters:
        `n` - the value (`null` permitted).
        `seriesKey` - the series key (`null` not permitted).
        `rowKey` - the row key (`null` not permitted).
        `columnKey` - the column key (`null` not permitted).

    - #### equals

          public boolean equals(java.lang.Object obj)

      Tests this instance for equality with an arbitrary object.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `obj` - the object (`null` permitted).
      Returns:
        A boolean.