Module org.jfree.chart3d
Package org.jfree.chart3d.data

# Class DefaultKeyedValues3D<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>

java.lang.Object
org.jfree.chart3d.data.DefaultKeyedValues3D<S,R,C,V>

Type Parameters:
  `S` - the series key (must implement Comparable).
  `R` - the row key (must implement Comparable).
  `C` - the column key (must implement Comparable).
  `V` - the value type.

All Implemented Interfaces:
  `Serializable`, `KeyedValues3D<S,R,C,V>`, `Values3D<V>`

public final class DefaultKeyedValues3D<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V> extends Object implements KeyedValues3D<S,R,C,V>, 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
Description
`DefaultKeyedValues3D()`
Creates a new (empty) table.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
Tests this instance for equality with an arbitrary object.
`int`
`getColumnCount()`
Returns the number of items in the z-dimension.
`int`
`getColumnIndex(C columnKey)`
Returns the index for the specified column key, or `-1` if the key is not present in this data structure.
`C`
`getColumnKey(int columnIndex)`
Returns the column key with the specified index.
`List<C>`
`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(R rowKey)`
Returns the index for the specified row key, or `-1` if the key is not present in this data structure.
`R`
`getRowKey(int rowIndex)`
Returns the row key with the specified index.
`List<R>`
`getRowKeys()`
Returns a list of the row keys for the data.
`int`
`getSeriesCount()`
Returns the number of items in the x-dimension.
`int`
`getSeriesIndex(S seriesKey)`
Returns the index for the specified series key, or `-1` if the key is not present in this data structure.
`S`
`getSeriesKey(int seriesIndex)`
Returns the series key with the specified index.
`List<S>`
`getSeriesKeys()`
Returns a list of the series keys for the data.
`V`
`getValue(int seriesIndex, int rowIndex, int columnIndex)`
Returns the data item at the specified position.
`V`
`getValue(S seriesKey, R rowKey, C columnKey)`
Returns the value for the specified data item.
`void`
`setValue(V n, S seriesKey, R rowKey, C 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 Details

### DefaultKeyedValues3D

public DefaultKeyedValues3D()
Creates a new (empty) table.

## Method Details

### getSeriesKey

public S getSeriesKey(int seriesIndex)
Returns the series key with the specified index.

Specified by:
  `getSeriesKey` in interface `KeyedValues3D<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Parameters:
  `seriesIndex` - the series index.
Returns:
  The series key.

### getRowKey

public R getRowKey(int rowIndex)
Returns the row key with the specified index.

Specified by:
  `getRowKey` in interface `KeyedValues3D<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Parameters:
  `rowIndex` - the row index.
Returns:
  The row key.

### getColumnKey

public C getColumnKey(int columnIndex)
Returns the column key with the specified index.

Specified by:
  `getColumnKey` in interface `KeyedValues3D<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Parameters:
  `columnIndex` - the column index.
Returns:
  The column key.

### getSeriesIndex

public int getSeriesIndex(S 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<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Parameters:
  `seriesKey` - the series key (`null` not permitted).
Returns:
  The series index or `-1`.

### getRowIndex

public int getRowIndex(R 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<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Parameters:
  `rowKey` - the row key (`null` not permitted).
Returns:
  The row index or `-1`.

### getColumnIndex

public int getColumnIndex(C 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<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Parameters:
  `columnKey` - the column key (`null` not permitted).
Returns:
  The column index or `-1`.

### getSeriesKeys

public List<S> 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<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Returns:
  A list of the series keys (possibly empty, but never `null`).

### getRowKeys

public List<R> 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<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,V>`
Returns:
  A list of the row keys (possibly empty, but never `null`).

### getColumnKeys

public List<C> 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<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,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<S extends Comparable<S>>`
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<S extends Comparable<S>>`
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<S extends Comparable<S>>`
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<S extends Comparable<S>>`
Parameters:
  `seriesIndex` - the series-index.
  `rowIndex` - the row-index.
  `columnIndex` - the column-index.
Returns:
  The data value (possibly `null`).

### getValue

public V getValue(S seriesKey, R rowKey, C 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<S extends Comparable<S>,R extends Comparable<R>,C extends Comparable<C>,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<S extends Comparable<S>>`
Parameters:
  `seriesIndex` - the series index.
  `rowIndex` - the row index.
  `columnIndex` - the column index.
Returns:
  The data value.

### setValue

public void setValue(V n, S seriesKey, R rowKey, C 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(Object obj)
Tests this instance for equality with an arbitrary object.

Overrides:
  `equals` in class `Object`
Parameters:
  `obj` - the object (`null` permitted).
Returns:
  A boolean.