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
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.
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests this instance for equality with an arbitrary object.int
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.getColumnKey
(int columnIndex) Returns the column key with the specified index.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
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.getRowKey
(int rowIndex) Returns the row key with the specified index.Returns a list of the row keys for the data.int
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.getSeriesKey
(int seriesIndex) Returns the series key with the specified index.Returns a list of the series keys for the data.getValue
(int seriesIndex, int rowIndex, int columnIndex) Returns the data item at the specified position.Returns the value for the specified data item.void
Sets the value for an item in a series, overwriting any existing value.
-
Constructor Details
-
DefaultKeyedValues3D
public DefaultKeyedValues3D()Creates a new (empty) table.
-
-
Method Details
-
getSeriesKey
Returns the series key with the specified index.- Specified by:
getSeriesKey
in interfaceKeyedValues3D<S extends Comparable<S>,
R extends Comparable<R>, C extends Comparable<C>, V> - Parameters:
seriesIndex
- the series index.- Returns:
- The series key.
-
getRowKey
Returns the row key with the specified index.- Specified by:
getRowKey
in interfaceKeyedValues3D<S extends Comparable<S>,
R extends Comparable<R>, C extends Comparable<C>, V> - Parameters:
rowIndex
- the row index.- Returns:
- The row key.
-
getColumnKey
Returns the column key with the specified index.- Specified by:
getColumnKey
in interfaceKeyedValues3D<S extends Comparable<S>,
R extends Comparable<R>, C extends Comparable<C>, V> - Parameters:
columnIndex
- the column index.- Returns:
- The column key.
-
getSeriesIndex
Returns the index for the specified series key, or-1
if the key is not present in this data structure.- Specified by:
getSeriesIndex
in interfaceKeyedValues3D<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
Returns the index for the specified row key, or-1
if the key is not present in this data structure.- Specified by:
getRowIndex
in interfaceKeyedValues3D<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
Returns the index for the specified column key, or-1
if the key is not present in this data structure.- Specified by:
getColumnIndex
in interfaceKeyedValues3D<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
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 interfaceKeyedValues3D<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
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 interfaceKeyedValues3D<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
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 interfaceKeyedValues3D<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
Description copied from interface:Values3D
Returns the number of items in the x-dimension.- Specified by:
getSeriesCount
in interfaceValues3D<S extends Comparable<S>>
- Returns:
- The number of items in the x-dimension.
-
getRowCount
Description copied from interface:Values3D
Returns the number of items in the y-dimension.- Specified by:
getRowCount
in interfaceValues3D<S extends Comparable<S>>
- Returns:
- The number of items in the y-dimension.
-
getColumnCount
Description copied from interface:Values3D
Returns the number of items in the z-dimension.- Specified by:
getColumnCount
in interfaceValues3D<S extends Comparable<S>>
- Returns:
- The number of items in the z-dimension.
-
getValue
Description copied from interface:Values3D
Returns the data item at the specified position.- Specified by:
getValue
in interfaceValues3D<S extends Comparable<S>>
- Parameters:
seriesIndex
- the series-index.rowIndex
- the row-index.columnIndex
- the column-index.- Returns:
- The data value (possibly
null
).
-
getValue
Returns the value for the specified data item. This method will throw anIllegalArgumentException
if the dataset does not contain the specified keys.- Specified by:
getValue
in interfaceKeyedValues3D<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
Description copied from interface:Values3D
Returns the data item at the specified position as a double primitive. Where theValues3D.getValue(int, int, int)
method returnsnull
, this method returnsDouble.NaN
.- Specified by:
getDoubleValue
in interfaceValues3D<S extends Comparable<S>>
- Parameters:
seriesIndex
- the series index.rowIndex
- the row index.columnIndex
- the column index.- Returns:
- The data value.
-
setValue
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
Tests this instance for equality with an arbitrary object.
-