java.lang.Object
de.grogra.pf.data.DatasetAdapterBase
de.grogra.pf.data.DatasetAdapter
- All Implemented Interfaces:
CategoryDataset
,Dataset
,KeyedValueDataset
,PieDataset
,SeriesDataset
,ValueDataset
,KeyedValue
,KeyedValues
,KeyedValues2D
,StatisticalCategoryDataset
,Value
,Values
,Values2D
,TableXYDataset
,XYDataset
,XYZDataset
public final class DatasetAdapter
extends DatasetAdapterBase
implements ValueDataset, KeyedValueDataset, CategoryDataset, PieDataset, SeriesDataset, XYDataset, TableXYDataset, XYZDataset, StatisticalCategoryDataset
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of columns in the table.int
getColumnIndex
(Comparable key) Returns the column index for a given key.getColumnKey
(int column) Returns the column key for a given index.Returns the column keys.int
getIndex
(Comparable key) Returns the index for a given key.int
Returns the number of items (values) in the collection.int
getItemCount
(int series) Returns the number of items in a series.getKey()
Returns the key associated with the value.getKey
(int index) Returns the key associated with the item at a given position.getKeys()
Returns the keys for the values in the collection.getMeanValue
(int row, int column) Returns the mean value for an item.getMeanValue
(Comparable rowKey, Comparable columnKey) Returns the mean value for an item.int
Returns the number of rows in the table.int
getRowIndex
(Comparable key) Returns the row index for a given key.getRowKey
(int row) Returns the row key for a given index.Returns the row keys.getStdDevValue
(int row, int column) Returns the standard deviation value for an item.getStdDevValue
(Comparable rowKey, Comparable columnKey) Returns the standard deviation value for an item.getValue()
Returns the value.getValue
(int item) Returns the value with the specified index.getValue
(int row, int column) Returns a value from the table.getValue
(Comparable key) Returns the value for a given key.getValue
(Comparable rowKey, Comparable columnKey) Returns the value associated with the specified keys.getX
(int series, int item) Returns the x-value for an item within a series.double
getXValue
(int series, int item) Returns the x-value for an item within a series.getY
(int series, int item) Returns the y-value for an item within a series.double
getYValue
(int series, int item) Returns the y-value (as a double primitive) for an item within a series.getZ
(int series, int item) Returns the z-value for the specified series and item.double
getZValue
(int series, int item) Returns the z-value (as a double primitive) for an item within a series.Methods inherited from class de.grogra.pf.data.DatasetAdapterBase
addChangeListener, getDomainOrder, getGroup, getSeriesCount, getSeriesKey, indexOf, removeChangeListener, setGroup
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
Methods inherited from interface org.jfree.data.general.SeriesDataset
getSeriesCount, getSeriesKey, indexOf
Methods inherited from interface org.jfree.data.xy.XYDataset
getDomainOrder
-
Method Details
-
getItemCount
public int getItemCount(int series) Description copied from interface:XYDataset
Returns the number of items in a series.
It is recommended that classes that implement this method should throw anIllegalArgumentException
if theseries
argument is outside the specified range.- Specified by:
getItemCount
in interfaceXYDataset
- Parameters:
series
- the series index (in the range0
togetSeriesCount() - 1
).- Returns:
- The item count.
-
getX
Description copied from interface:XYDataset
Returns the x-value for an item within a series. The x-values may or may not be returned in ascending order, that is up to the class implementing the interface. -
getY
Description copied from interface:XYDataset
Returns the y-value for an item within a series. -
getZ
Description copied from interface:XYZDataset
Returns the z-value for the specified series and item.- Specified by:
getZ
in interfaceXYZDataset
- Parameters:
series
- the series index (zero-based).item
- the item index (zero-based).- Returns:
- The z-value (possibly
null
).
-
getValue
Description copied from interface:Value
Returns the value. -
getKey
Description copied from interface:KeyedValue
Returns the key associated with the value. The key returned by this method should be immutable.- Specified by:
getKey
in interfaceKeyedValue
- Returns:
- The key (never
null
).
-
getRowKey
Description copied from interface:KeyedValues2D
Returns the row key for a given index.- Specified by:
getRowKey
in interfaceKeyedValues2D
- Parameters:
row
- the row index (zero-based).- Returns:
- The row key.
-
getRowIndex
Description copied from interface:KeyedValues2D
Returns the row index for a given key.- Specified by:
getRowIndex
in interfaceKeyedValues2D
- Parameters:
key
- the row key.- Returns:
- The row index, or
-1
if the key is unrecognised.
-
getRowKeys
Description copied from interface:KeyedValues2D
Returns the row keys.- Specified by:
getRowKeys
in interfaceKeyedValues2D
- Returns:
- The keys.
-
getRowCount
public int getRowCount()Description copied from interface:Values2D
Returns the number of rows in the table.- Specified by:
getRowCount
in interfaceValues2D
- Returns:
- The row count.
-
getColumnKey
Description copied from interface:KeyedValues2D
Returns the column key for a given index.- Specified by:
getColumnKey
in interfaceKeyedValues2D
- Parameters:
column
- the column index (zero-based).- Returns:
- The column key.
-
getColumnIndex
Description copied from interface:KeyedValues2D
Returns the column index for a given key.- Specified by:
getColumnIndex
in interfaceKeyedValues2D
- Parameters:
key
- the column key.- Returns:
- The column index, or
-1
if the key is unrecognised.
-
getColumnKeys
Description copied from interface:KeyedValues2D
Returns the column keys.- Specified by:
getColumnKeys
in interfaceKeyedValues2D
- Returns:
- The keys.
-
getColumnCount
public int getColumnCount()Description copied from interface:Values2D
Returns the number of columns in the table.- Specified by:
getColumnCount
in interfaceValues2D
- Returns:
- The column count.
-
getValue
Description copied from interface:KeyedValues2D
Returns the value associated with the specified keys.- Specified by:
getValue
in interfaceKeyedValues2D
- Parameters:
rowKey
- the row key (null
not permitted).columnKey
- the column key (null
not permitted).- Returns:
- The value.
-
getValue
Description copied from interface:Values2D
Returns a value from the table. -
getKey
Description copied from interface:KeyedValues
Returns the key associated with the item at a given position. Note that some implementations allow re-ordering of the data items, so the result may be transient.- Specified by:
getKey
in interfaceKeyedValues
- Parameters:
index
- the item index (in the range0
togetItemCount() - 1
).- Returns:
- The key (never
null
).
-
getIndex
Description copied from interface:KeyedValues
Returns the index for a given key.- Specified by:
getIndex
in interfaceKeyedValues
- Parameters:
key
- the key (null
not permitted).- Returns:
- The index, or
-1
if the key is unrecognised.
-
getKeys
Description copied from interface:KeyedValues
Returns the keys for the values in the collection. Note that you can access the values in this collection by key or by index. For this reason, the key order is important - this method should return the keys in order. The returned list may be unmodifiable.- Specified by:
getKeys
in interfaceKeyedValues
- Returns:
- The keys (never
null
).
-
getValue
Description copied from interface:KeyedValues
Returns the value for a given key.- Specified by:
getValue
in interfaceKeyedValues
- Parameters:
key
- the key.- Returns:
- The value (possibly
null
).
-
getItemCount
public int getItemCount()Description copied from interface:Values
Returns the number of items (values) in the collection.- Specified by:
getItemCount
in interfaceTableXYDataset
- Specified by:
getItemCount
in interfaceValues
- Returns:
- The item count (possibly zero).
-
getValue
Description copied from interface:Values
Returns the value with the specified index. -
getXValue
public double getXValue(int series, int item) Description copied from interface:XYDataset
Returns the x-value for an item within a series. -
getYValue
public double getYValue(int series, int item) Description copied from interface:XYDataset
Returns the y-value (as a double primitive) for an item within a series. -
getZValue
public double getZValue(int series, int item) Description copied from interface:XYZDataset
Returns the z-value (as a double primitive) for an item within a series.- Specified by:
getZValue
in interfaceXYZDataset
- Parameters:
series
- the series (zero-based index).item
- the item (zero-based index).- Returns:
- The z-value.
-
getMeanValue
Description copied from interface:StatisticalCategoryDataset
Returns the mean value for an item.- Specified by:
getMeanValue
in interfaceStatisticalCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The mean value (possibly
null
).
-
getMeanValue
Description copied from interface:StatisticalCategoryDataset
Returns the mean value for an item.- Specified by:
getMeanValue
in interfaceStatisticalCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the columnKey.- Returns:
- The mean value (possibly
null
).
-
getStdDevValue
Description copied from interface:StatisticalCategoryDataset
Returns the standard deviation value for an item.- Specified by:
getStdDevValue
in interfaceStatisticalCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The standard deviation (possibly
null
).
-
getStdDevValue
Description copied from interface:StatisticalCategoryDataset
Returns the standard deviation value for an item.- Specified by:
getStdDevValue
in interfaceStatisticalCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the columnKey.- Returns:
- The standard deviation (possibly
null
).
-