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 TypeMethodDescriptionbooleanTests this instance for equality with an arbitrary object.intReturns the number of items in the z-dimension.intgetColumnIndex(C columnKey) Returns the index for the specified column key, or-1if 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.doublegetDoubleValue(int seriesIndex, int rowIndex, int columnIndex) Returns the data item at the specified position as a double primitive.intReturns the number of items in the y-dimension.intgetRowIndex(R rowKey) Returns the index for the specified row key, or-1if 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.intReturns the number of items in the x-dimension.intgetSeriesIndex(S seriesKey) Returns the index for the specified series key, or-1if 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.voidSets 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:
getSeriesKeyin 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:
getRowKeyin 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:
getColumnKeyin 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-1if the key is not present in this data structure.- Specified by:
getSeriesIndexin interfaceKeyedValues3D<S extends Comparable<S>,R extends Comparable<R>, C extends Comparable<C>, V> - Parameters:
seriesKey- the series key (nullnot permitted).- Returns:
- The series index or
-1.
-
getRowIndex
Returns the index for the specified row key, or-1if the key is not present in this data structure.- Specified by:
getRowIndexin interfaceKeyedValues3D<S extends Comparable<S>,R extends Comparable<R>, C extends Comparable<C>, V> - Parameters:
rowKey- the row key (nullnot permitted).- Returns:
- The row index or
-1.
-
getColumnIndex
Returns the index for the specified column key, or-1if the key is not present in this data structure.- Specified by:
getColumnIndexin interfaceKeyedValues3D<S extends Comparable<S>,R extends Comparable<R>, C extends Comparable<C>, V> - Parameters:
columnKey- the column key (nullnot 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:
getSeriesKeysin 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:
getRowKeysin 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:
getColumnKeysin 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:Values3DReturns the number of items in the x-dimension.- Specified by:
getSeriesCountin interfaceValues3D<S extends Comparable<S>>- Returns:
- The number of items in the x-dimension.
-
getRowCount
Description copied from interface:Values3DReturns the number of items in the y-dimension.- Specified by:
getRowCountin interfaceValues3D<S extends Comparable<S>>- Returns:
- The number of items in the y-dimension.
-
getColumnCount
Description copied from interface:Values3DReturns the number of items in the z-dimension.- Specified by:
getColumnCountin interfaceValues3D<S extends Comparable<S>>- Returns:
- The number of items in the z-dimension.
-
getValue
Description copied from interface:Values3DReturns the data item at the specified position.- Specified by:
getValuein 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 anIllegalArgumentExceptionif the dataset does not contain the specified keys.- Specified by:
getValuein interfaceKeyedValues3D<S extends Comparable<S>,R extends Comparable<R>, C extends Comparable<C>, V> - Parameters:
seriesKey- the series key (nullnot permitted).rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).- Returns:
- The value (possibly
null).
-
getDoubleValue
Description copied from interface:Values3DReturns 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:
getDoubleValuein 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 (nullpermitted).seriesKey- the series key (nullnot permitted).rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).
-
equals
Tests this instance for equality with an arbitrary object.
-