Package org.jfree.data.statistics
Class DefaultStatisticalCategoryDataset
java.lang.Object
org.jfree.data.AbstractDataset
org.jfree.data.statistics.DefaultStatisticalCategoryDataset
- All Implemented Interfaces:
ObjectInputValidation
,Serializable
,Cloneable
,CategoryDataset
,Dataset
,KeyedValues2D
,RangeInfo
,StatisticalCategoryDataset
,Values2D
- Direct Known Subclasses:
BioStatisticalCategoryDataset
public class DefaultStatisticalCategoryDataset extends AbstractDataset implements StatisticalCategoryDataset, RangeInfo
A convenience class that provides a default implementation of the
StatisticalCategoryDataset
interface.- Author:
- Pascal Collet
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DefaultStatisticalCategoryDataset()
Creates a new dataset. -
Method Summary
Modifier and Type Method Description void
add(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey)
void
add(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey, boolean showOnlyHalfErrorBar)
Adds a mean and standard deviation to the table.boolean
drawOnlyTopOfErrorBar()
int
getColumnCount()
Returns the number of columns in the table.int
getColumnIndex(Comparable key)
Returns the column index for a given key.Comparable
getColumnKey(int column)
Returns a column key.List
getColumnKeys()
Returns the column keys.double
getErrorBarLen()
Number
getMaximumRangeValue()
Returns the maximum value in the dataset's range (or null if all the values in the range are null).Number
getMeanValue(int row, int column)
Returns the mean value for an item.Number
getMeanValue(Comparable rowKey, Comparable columnKey)
Returns the mean value for an item.Number
getMinimumRangeValue()
Returns the minimum value in the dataset's range (or null if all the values in the range are null).int
getRowCount()
Returns the number of rows in the table.int
getRowIndex(Comparable key)
Returns the row index for a given key.Comparable
getRowKey(int row)
Returns a row key.List
getRowKeys()
Returns the row keys.Number
getStdDevValue(int row, int column)
Returns the standard deviation value for an item.Number
getStdDevValue(Comparable rowKey, Comparable columnKey)
Returns the standard deviation value for an item.Number
getValue(int row, int column)
Returns the value for an item.Number
getValue(Comparable rowKey, Comparable columnKey)
Returns the value for an item.Range
getValueRange()
Returns the range of the values in this dataset's range.void
setDrawOnlyTopOfErrorBar(boolean value)
void
setErrorBarLen(double value)
Methods inherited from class org.jfree.data.AbstractDataset
addChangeListener, clone, getGroup, removeChangeListener, setGroup, validateObject
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
-
Constructor Details
-
DefaultStatisticalCategoryDataset
public DefaultStatisticalCategoryDataset()Creates a new dataset.
-
-
Method Details
-
getMeanValue
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.
-
getValue
Returns the value for an item. -
getValue
Returns the value for an item.- Specified by:
getValue
in interfaceKeyedValues2D
- Parameters:
rowKey
- the row key.columnKey
- the columnKey.- Returns:
- the value.
-
getMeanValue
Returns the mean value for an item.- Specified by:
getMeanValue
in interfaceStatisticalCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the columnKey.- Returns:
- the mean value.
-
getStdDevValue
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.
-
getStdDevValue
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.
-
getColumnIndex
Returns the column index for a given key.- Specified by:
getColumnIndex
in interfaceKeyedValues2D
- Parameters:
key
- the column key.- Returns:
- the column index.
-
getColumnKey
Returns a column key.- Specified by:
getColumnKey
in interfaceKeyedValues2D
- Parameters:
column
- the column index (zero-based).- Returns:
- the column key.
-
getColumnKeys
Returns the column keys.- Specified by:
getColumnKeys
in interfaceKeyedValues2D
- Returns:
- the keys.
-
getRowIndex
Returns the row index for a given key.- Specified by:
getRowIndex
in interfaceKeyedValues2D
- Parameters:
key
- the row key.- Returns:
- the row index.
-
getRowKey
Returns a row key.- Specified by:
getRowKey
in interfaceKeyedValues2D
- Parameters:
row
- the row index (zero-based).- Returns:
- the row key.
-
getRowKeys
Returns the row keys.- Specified by:
getRowKeys
in interfaceKeyedValues2D
- Returns:
- the keys.
-
getRowCount
public int getRowCount()Returns the number of rows in the table.- Specified by:
getRowCount
in interfaceValues2D
- Returns:
- the row count.
-
getColumnCount
public int getColumnCount()Returns the number of columns in the table.- Specified by:
getColumnCount
in interfaceValues2D
- Returns:
- the column count.
-
add
public void add(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey, boolean showOnlyHalfErrorBar)Adds a mean and standard deviation to the table.- Parameters:
mean
- the mean.standardDeviation
- the standard deviation.rowKey
- the row key.columnKey
- the column key.
-
add
-
getMinimumRangeValue
Returns the minimum value in the dataset's range (or null if all the values in the range are null).- Specified by:
getMinimumRangeValue
in interfaceRangeInfo
- Returns:
- the minimum value.
-
getMaximumRangeValue
Returns the maximum value in the dataset's range (or null if all the values in the range are null).- Specified by:
getMaximumRangeValue
in interfaceRangeInfo
- Returns:
- the maximum value.
-
getValueRange
Returns the range of the values in this dataset's range.- Specified by:
getValueRange
in interfaceRangeInfo
- Returns:
- the range.
-
drawOnlyTopOfErrorBar
public boolean drawOnlyTopOfErrorBar()- Specified by:
drawOnlyTopOfErrorBar
in interfaceStatisticalCategoryDataset
-
setDrawOnlyTopOfErrorBar
public void setDrawOnlyTopOfErrorBar(boolean value)- Specified by:
setDrawOnlyTopOfErrorBar
in interfaceStatisticalCategoryDataset
-
getErrorBarLen
public double getErrorBarLen()- Specified by:
getErrorBarLen
in interfaceStatisticalCategoryDataset
-
setErrorBarLen
public void setErrorBarLen(double value)- Specified by:
setErrorBarLen
in interfaceStatisticalCategoryDataset
-