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 voidadd(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey)voidadd(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey, boolean showOnlyHalfErrorBar)Adds a mean and standard deviation to the table.booleandrawOnlyTopOfErrorBar()intgetColumnCount()Returns the number of columns in the table.intgetColumnIndex(Comparable key)Returns the column index for a given key.ComparablegetColumnKey(int column)Returns a column key.ListgetColumnKeys()Returns the column keys.doublegetErrorBarLen()NumbergetMaximumRangeValue()Returns the maximum value in the dataset's range (or null if all the values in the range are null).NumbergetMeanValue(int row, int column)Returns the mean value for an item.NumbergetMeanValue(Comparable rowKey, Comparable columnKey)Returns the mean value for an item.NumbergetMinimumRangeValue()Returns the minimum value in the dataset's range (or null if all the values in the range are null).intgetRowCount()Returns the number of rows in the table.intgetRowIndex(Comparable key)Returns the row index for a given key.ComparablegetRowKey(int row)Returns a row key.ListgetRowKeys()Returns the row keys.NumbergetStdDevValue(int row, int column)Returns the standard deviation value for an item.NumbergetStdDevValue(Comparable rowKey, Comparable columnKey)Returns the standard deviation value for an item.NumbergetValue(int row, int column)Returns the value for an item.NumbergetValue(Comparable rowKey, Comparable columnKey)Returns the value for an item.RangegetValueRange()Returns the range of the values in this dataset's range.voidsetDrawOnlyTopOfErrorBar(boolean value)voidsetErrorBarLen(double value)Methods inherited from class org.jfree.data.AbstractDataset
addChangeListener, clone, getGroup, removeChangeListener, setGroup, validateObjectMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getMeanValuein 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:
getValuein interfaceKeyedValues2D- Parameters:
rowKey- the row key.columnKey- the columnKey.- Returns:
- the value.
-
getMeanValue
Returns the mean value for an item.- Specified by:
getMeanValuein interfaceStatisticalCategoryDataset- Parameters:
rowKey- the row key.columnKey- the columnKey.- Returns:
- the mean value.
-
getStdDevValue
Returns the standard deviation value for an item.- Specified by:
getStdDevValuein 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:
getStdDevValuein interfaceStatisticalCategoryDataset- Parameters:
rowKey- the row key.columnKey- the columnKey.- Returns:
- the standard deviation.
-
getColumnIndex
Returns the column index for a given key.- Specified by:
getColumnIndexin interfaceKeyedValues2D- Parameters:
key- the column key.- Returns:
- the column index.
-
getColumnKey
Returns a column key.- Specified by:
getColumnKeyin interfaceKeyedValues2D- Parameters:
column- the column index (zero-based).- Returns:
- the column key.
-
getColumnKeys
Returns the column keys.- Specified by:
getColumnKeysin interfaceKeyedValues2D- Returns:
- the keys.
-
getRowIndex
Returns the row index for a given key.- Specified by:
getRowIndexin interfaceKeyedValues2D- Parameters:
key- the row key.- Returns:
- the row index.
-
getRowKey
Returns a row key.- Specified by:
getRowKeyin interfaceKeyedValues2D- Parameters:
row- the row index (zero-based).- Returns:
- the row key.
-
getRowKeys
Returns the row keys.- Specified by:
getRowKeysin interfaceKeyedValues2D- Returns:
- the keys.
-
getRowCount
public int getRowCount()Returns the number of rows in the table.- Specified by:
getRowCountin interfaceValues2D- Returns:
- the row count.
-
getColumnCount
public int getColumnCount()Returns the number of columns in the table.- Specified by:
getColumnCountin 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:
getMinimumRangeValuein 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:
getMaximumRangeValuein interfaceRangeInfo- Returns:
- the maximum value.
-
getValueRange
Returns the range of the values in this dataset's range.- Specified by:
getValueRangein interfaceRangeInfo- Returns:
- the range.
-
drawOnlyTopOfErrorBar
public boolean drawOnlyTopOfErrorBar()- Specified by:
drawOnlyTopOfErrorBarin interfaceStatisticalCategoryDataset
-
setDrawOnlyTopOfErrorBar
public void setDrawOnlyTopOfErrorBar(boolean value)- Specified by:
setDrawOnlyTopOfErrorBarin interfaceStatisticalCategoryDataset
-
getErrorBarLen
public double getErrorBarLen()- Specified by:
getErrorBarLenin interfaceStatisticalCategoryDataset
-
setErrorBarLen
public void setErrorBarLen(double value)- Specified by:
setErrorBarLenin interfaceStatisticalCategoryDataset
-