org.jfree.data.statistics

Class DefaultStatisticalCategoryDataset

public class DefaultStatisticalCategoryDataset extends AbstractDataset implements StatisticalCategoryDataset, RangeInfo, PublicCloneable

A convenience class that provides a default implementation of the StatisticalCategoryDataset interface.
Constructor Summary
DefaultStatisticalCategoryDataset()
Creates a new dataset.
Method Summary
voidadd(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 a DatasetChangeEvent to all registered listeners.
Objectclone()
Returns a clone of this dataset.
booleanequals(Object obj)
Tests this instance for equality with an arbitrary object.
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.
NumbergetMeanValue(int row, int column)
Returns the mean value for an item.
NumbergetMeanValue(Comparable rowKey, Comparable columnKey)
Returns the mean value for an item.
RangegetRangeBounds(boolean includeInterval)
Returns the range of the values in this dataset's range.
doublegetRangeLowerBound(boolean includeInterval)
Returns the minimum y-value in the dataset.
doublegetRangeUpperBound(boolean includeInterval)
Returns the maximum y-value in the dataset.
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 (for this dataset, the mean value is returned).
NumbergetValue(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 a DatasetChangeEvent to all registered listeners.
voidremoveColumn(int columnIndex)
Removes a column from the dataset and sends a DatasetChangeEvent to all registered listeners.
voidremoveColumn(Comparable columnKey)
Removes a column from the dataset and sends a DatasetChangeEvent to all registered listeners.
voidremoveRow(int rowIndex)
Removes a row from the dataset and sends a DatasetChangeEvent to all registered listeners.
voidremoveRow(Comparable rowKey)
Removes a row from the dataset and sends a DatasetChangeEvent to all registered listeners.

Constructor Detail

DefaultStatisticalCategoryDataset

public DefaultStatisticalCategoryDataset()
Creates a new dataset.

Method Detail

add

public void add(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey)
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

public void add(Number mean, Number standardDeviation, Comparable rowKey, Comparable columnKey)
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.

clear

public void clear()
Clears all data from the dataset and sends a DatasetChangeEvent to all registered listeners.

Since: 1.0.7

clone

public Object clone()
Returns a clone of this dataset.

Returns: A clone of this dataset.

Throws: CloneNotSupportedException if cloning cannot be completed.

equals

public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.

Parameters: obj the object (null permitted).

Returns: A boolean.

getColumnCount

public int getColumnCount()
Returns the number of columns in the table.

Returns: The column count.

See Also: getRowCount

getColumnIndex

public int getColumnIndex(Comparable key)
Returns the column index for a given key.

Parameters: key the column key (null not permitted).

Returns: The column index.

getColumnKey

public Comparable getColumnKey(int column)
Returns a column key.

Parameters: column the column index (zero-based).

Returns: The column key.

getColumnKeys

public List getColumnKeys()
Returns the column keys.

Returns: The keys.

getMeanValue

public Number getMeanValue(int row, int column)
Returns the mean value for an item.

Parameters: row the row index (zero-based). column the column index (zero-based).

Returns: The mean value (possibly null).

getMeanValue

public Number getMeanValue(Comparable rowKey, Comparable columnKey)
Returns the mean value for an item.

Parameters: rowKey the row key. columnKey the columnKey.

Returns: The mean value (possibly null).

getRangeBounds

public Range getRangeBounds(boolean includeInterval)
Returns the range of the values in this dataset's range.

Parameters: includeInterval a flag that determines whether or not the y-interval is taken into account.

Returns: The range.

getRangeLowerBound

public double getRangeLowerBound(boolean includeInterval)
Returns the minimum y-value in the dataset.

Parameters: includeInterval a flag that determines whether or not the y-interval is taken into account.

Returns: The minimum value.

See Also: DefaultStatisticalCategoryDataset

getRangeUpperBound

public double getRangeUpperBound(boolean includeInterval)
Returns the maximum y-value in the dataset.

Parameters: includeInterval a flag that determines whether or not the y-interval is taken into account.

Returns: The maximum value.

See Also: DefaultStatisticalCategoryDataset

getRowCount

public int getRowCount()
Returns the number of rows in the table.

Returns: The row count.

See Also: getColumnCount

getRowIndex

public int getRowIndex(Comparable key)
Returns the row index for a given key.

Parameters: key the row key (null not permitted).

Returns: The row index.

getRowKey

public Comparable getRowKey(int row)
Returns a row key.

Parameters: row the row index (zero-based).

Returns: The row key.

getRowKeys

public List getRowKeys()
Returns the row keys.

Returns: The keys.

getStdDevValue

public Number getStdDevValue(int row, int column)
Returns the standard deviation value for an item.

Parameters: row the row index (zero-based). column the column index (zero-based).

Returns: The standard deviation (possibly null).

getStdDevValue

public Number getStdDevValue(Comparable rowKey, Comparable columnKey)
Returns the standard deviation value for an item.

Parameters: rowKey the row key. columnKey the columnKey.

Returns: The standard deviation (possibly null).

getValue

public Number getValue(int row, int column)
Returns the value for an item (for this dataset, the mean value is returned).

Parameters: row the row index. column the column index.

Returns: The value (possibly null).

getValue

public Number getValue(Comparable rowKey, Comparable columnKey)
Returns the value for an item (for this dataset, the mean value is returned).

Parameters: rowKey the row key. columnKey the columnKey.

Returns: The value (possibly null).

remove

public void remove(Comparable rowKey, Comparable columnKey)
Removes an item from the dataset and sends a DatasetChangeEvent to all registered listeners.

Parameters: rowKey the row key (null not permitted). columnKey the column key (null not permitted).

Since: 1.0.7

See Also:

removeColumn

public void removeColumn(int columnIndex)
Removes a column from the dataset and sends a DatasetChangeEvent to all registered listeners.

Parameters: columnIndex the column index.

Since: 1.0.7

See Also:

removeColumn

public void removeColumn(Comparable columnKey)
Removes a column from the dataset and sends a DatasetChangeEvent to all registered listeners.

Parameters: columnKey the column key (null not permitted).

Since: 1.0.7

See Also:

removeRow

public void removeRow(int rowIndex)
Removes a row from the dataset and sends a DatasetChangeEvent to all registered listeners.

Parameters: rowIndex the row index.

Since: 1.0.7

See Also:

removeRow

public void removeRow(Comparable rowKey)
Removes a row from the dataset and sends a DatasetChangeEvent to all registered listeners.

Parameters: rowKey the row key (null not permitted).

Since: 1.0.7

See Also:

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.