java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.statistics.DefaultStatisticalCategoryDataset
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,PublicCloneable,CategoryDataset,Dataset,KeyedValues2D,RangeInfo,StatisticalCategoryDataset,Values2D
public class DefaultStatisticalCategoryDataset
extends AbstractDataset
implements StatisticalCategoryDataset, RangeInfo, PublicCloneable
A convenience class that provides a default implementation of the
StatisticalCategoryDataset interface.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey) Adds a mean and standard deviation to the table.voidadd(Number mean, Number standardDeviation, Comparable rowKey, Comparable columnKey) Adds a mean and standard deviation to the table.voidclear()Clears all data from the dataset and sends aDatasetChangeEventto all registered listeners.clone()Returns a clone of this dataset.booleanTests this instance for equality with an arbitrary object.intReturns the number of columns in the table.intgetColumnIndex(Comparable key) Returns the column index for a given key.getColumnKey(int column) Returns a column key.Returns the column keys.getMeanValue(int row, int column) Returns the mean value for an item.getMeanValue(Comparable rowKey, Comparable columnKey) Returns the mean value for an item.getRangeBounds(boolean includeInterval) Returns the bounds of the values in this dataset's y-values.doublegetRangeLowerBound(boolean includeInterval) Returns the minimum y-value in the dataset.doublegetRangeUpperBound(boolean includeInterval) Returns the maximum y-value in the dataset.intReturns the number of rows in the table.intgetRowIndex(Comparable key) Returns the row index for a given key.getRowKey(int row) Returns a row key.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(int row, int column) Returns the value for an item (for this dataset, the mean value is returned).getValue(Comparable rowKey, Comparable columnKey) Returns the value for an item (for this dataset, the mean value is returned).voidremove(Comparable rowKey, Comparable columnKey) Removes an item from the dataset and sends aDatasetChangeEventto all registered listeners.voidremoveColumn(int columnIndex) Removes a column from the dataset and sends aDatasetChangeEventto all registered listeners.voidremoveColumn(Comparable columnKey) Removes a column from the dataset and sends aDatasetChangeEventto all registered listeners.voidremoveRow(int rowIndex) Removes a row from the dataset and sends aDatasetChangeEventto all registered listeners.voidremoveRow(Comparable rowKey) Removes a row from the dataset and sends aDatasetChangeEventto all registered listeners.Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectMethods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.general.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 (possibly
null).
-
getValue
Returns the value for an item (for this dataset, the mean value is returned). -
getValue
Returns the value for an item (for this dataset, the mean value is returned).- Specified by:
getValuein interfaceKeyedValues2D- Parameters:
rowKey- the row key.columnKey- the columnKey.- Returns:
- The value (possibly
null).
-
getMeanValue
Returns the mean value for an item.- Specified by:
getMeanValuein interfaceStatisticalCategoryDataset- Parameters:
rowKey- the row key.columnKey- the columnKey.- Returns:
- The mean value (possibly
null).
-
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 (possibly
null).
-
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 (possibly
null).
-
getColumnIndex
Returns the column index for a given key.- Specified by:
getColumnIndexin interfaceKeyedValues2D- Parameters:
key- the column key (nullnot permitted).- 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 (nullnot permitted).- 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.
- See Also:
-
getColumnCount
public int getColumnCount()Returns the number of columns in the table.- Specified by:
getColumnCountin interfaceValues2D- Returns:
- The column count.
- See Also:
-
add
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
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.
-
remove
Removes an item from the dataset and sends aDatasetChangeEventto all registered listeners.- Parameters:
rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).- See Also:
-
removeRow
public void removeRow(int rowIndex) Removes a row from the dataset and sends aDatasetChangeEventto all registered listeners.- Parameters:
rowIndex- the row index.- See Also:
-
removeRow
Removes a row from the dataset and sends aDatasetChangeEventto all registered listeners.- Parameters:
rowKey- the row key (nullnot permitted).- See Also:
-
removeColumn
public void removeColumn(int columnIndex) Removes a column from the dataset and sends aDatasetChangeEventto all registered listeners.- Parameters:
columnIndex- the column index.- See Also:
-
removeColumn
Removes a column from the dataset and sends aDatasetChangeEventto all registered listeners.- Parameters:
columnKey- the column key (nullnot permitted).- See Also:
-
clear
public void clear()Clears all data from the dataset and sends aDatasetChangeEventto all registered listeners. -
getRangeLowerBound
public double getRangeLowerBound(boolean includeInterval) Returns the minimum y-value in the dataset.- Specified by:
getRangeLowerBoundin interfaceRangeInfo- Parameters:
includeInterval- a flag that determines whether or not the y-interval is taken into account.- Returns:
- The minimum value.
- See Also:
-
getRangeUpperBound
public double getRangeUpperBound(boolean includeInterval) Returns the maximum y-value in the dataset.- Specified by:
getRangeUpperBoundin interfaceRangeInfo- Parameters:
includeInterval- a flag that determines whether or not the y-interval is taken into account.- Returns:
- The maximum value.
- See Also:
-
getRangeBounds
Returns the bounds of the values in this dataset's y-values.- Specified by:
getRangeBoundsin interfaceRangeInfo- Parameters:
includeInterval- a flag that determines whether or not the y-interval is taken into account.- Returns:
- The range.
-
equals
Tests this instance for equality with an arbitrary object. -
clone
Returns a clone of this dataset.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classAbstractDataset- Returns:
- A clone of this dataset.
- Throws:
CloneNotSupportedException- if cloning cannot be completed.
-