org.jfree.data.statistics
Class DefaultStatisticalCategoryDataset

java.lang.Object
  extended byorg.jfree.data.general.AbstractDataset
      extended byorg.jfree.data.statistics.DefaultStatisticalCategoryDataset
All Implemented Interfaces:
CategoryDataset, java.lang.Cloneable, Dataset, KeyedValues2D, java.io.ObjectInputValidation, RangeInfo, java.io.Serializable, StatisticalCategoryDataset, Values2D

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
DefaultStatisticalCategoryDataset()
          Creates a new dataset.
 
Method Summary
 void add(double mean, double standardDeviation, java.lang.Comparable rowKey, java.lang.Comparable columnKey)
          Adds a mean and standard deviation to the table.
 void add(java.lang.Number mean, java.lang.Number standardDeviation, java.lang.Comparable rowKey, java.lang.Comparable columnKey)
          Adds a mean and standard deviation to the table.
 boolean equals(java.lang.Object obj)
          Tests this instance for equality with an arbitrary object.
 int getColumnCount()
          Returns the number of columns in the table.
 int getColumnIndex(java.lang.Comparable key)
          Returns the column index for a given key.
 java.lang.Comparable getColumnKey(int column)
          Returns a column key.
 java.util.List getColumnKeys()
          Returns the column keys.
 java.lang.Number getMeanValue(java.lang.Comparable rowKey, java.lang.Comparable columnKey)
          Returns the mean value for an item.
 java.lang.Number getMeanValue(int row, int column)
          Returns the mean value for an item.
 Range getRangeBounds(boolean includeInterval)
          Returns the range of the values in this dataset's range.
 double getRangeLowerBound(boolean includeInterval)
          Returns the minimum y-value in the dataset.
 double getRangeUpperBound(boolean includeInterval)
          Returns the maximum y-value in the dataset.
 int getRowCount()
          Returns the number of rows in the table.
 int getRowIndex(java.lang.Comparable key)
          Returns the row index for a given key.
 java.lang.Comparable getRowKey(int row)
          Returns a row key.
 java.util.List getRowKeys()
          Returns the row keys.
 java.lang.Number getStdDevValue(java.lang.Comparable rowKey, java.lang.Comparable columnKey)
          Returns the standard deviation value for an item.
 java.lang.Number getStdDevValue(int row, int column)
          Returns the standard deviation value for an item.
 java.lang.Number getValue(java.lang.Comparable rowKey, java.lang.Comparable columnKey)
          Returns the value for an item (for this dataset, the mean value is returned).
 java.lang.Number getValue(int row, int column)
          Returns the value for an item (for this dataset, the mean value is returned).
 
Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, clone, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup, validateObject
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
 

Constructor Detail

DefaultStatisticalCategoryDataset

public DefaultStatisticalCategoryDataset()
Creates a new dataset.

Method Detail

getMeanValue

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

Specified by:
getMeanValue in interface StatisticalCategoryDataset
Parameters:
row - the row index (zero-based).
column - the column index (zero-based).
Returns:
The mean value.

getValue

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

Specified by:
getValue in interface Values2D
Parameters:
row - the row index.
column - the column index.
Returns:
The value.

getValue

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

Specified by:
getValue in interface KeyedValues2D
Parameters:
rowKey - the row key.
columnKey - the columnKey.
Returns:
The value.

getMeanValue

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

Specified by:
getMeanValue in interface StatisticalCategoryDataset
Parameters:
rowKey - the row key.
columnKey - the columnKey.
Returns:
The mean value.

getStdDevValue

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

Specified by:
getStdDevValue in interface StatisticalCategoryDataset
Parameters:
row - the row index (zero-based).
column - the column index (zero-based).
Returns:
The standard deviation.

getStdDevValue

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

Specified by:
getStdDevValue in interface StatisticalCategoryDataset
Parameters:
rowKey - the row key.
columnKey - the columnKey.
Returns:
The standard deviation.

getColumnIndex

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

Specified by:
getColumnIndex in interface KeyedValues2D
Parameters:
key - the column key.
Returns:
The column index.

getColumnKey

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

Specified by:
getColumnKey in interface KeyedValues2D
Parameters:
column - the column index (zero-based).
Returns:
The column key.

getColumnKeys

public java.util.List getColumnKeys()
Returns the column keys.

Specified by:
getColumnKeys in interface KeyedValues2D
Returns:
The keys.

getRowIndex

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

Specified by:
getRowIndex in interface KeyedValues2D
Parameters:
key - the row key.
Returns:
The row index.

getRowKey

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

Specified by:
getRowKey in interface KeyedValues2D
Parameters:
row - the row index (zero-based).
Returns:
The row key.

getRowKeys

public java.util.List getRowKeys()
Returns the row keys.

Specified by:
getRowKeys in interface KeyedValues2D
Returns:
The keys.

getRowCount

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

Specified by:
getRowCount in interface Values2D
Returns:
The row count.

getColumnCount

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

Specified by:
getColumnCount in interface Values2D
Returns:
The column count.

add

public void add(double mean,
                double standardDeviation,
                java.lang.Comparable rowKey,
                java.lang.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(java.lang.Number mean,
                java.lang.Number standardDeviation,
                java.lang.Comparable rowKey,
                java.lang.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.

getRangeLowerBound

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

Specified by:
getRangeLowerBound in interface RangeInfo
Parameters:
includeInterval - a flag that determines whether or not the y-interval is taken into account (ignored for this dataset).
Returns:
The minimum value.

getRangeUpperBound

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

Specified by:
getRangeUpperBound in interface RangeInfo
Parameters:
includeInterval - a flag that determines whether or not the y-interval is taken into account (ignored for this dataset).
Returns:
The maximum value.

getRangeBounds

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

Specified by:
getRangeBounds in interface RangeInfo
Parameters:
includeInterval - a flag that determines whether or not the y-interval is taken into account.
Returns:
The range.

equals

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

Parameters:
obj - the object (null permitted).
Returns:
A boolean.