org.jfree.data.statistics

Class DefaultBoxAndWhiskerCategoryDataset

public class DefaultBoxAndWhiskerCategoryDataset extends AbstractDataset implements BoxAndWhiskerCategoryDataset, RangeInfo

A convenience class that provides a default implementation of the BoxAndWhiskerCategoryDataset interface.
Field Summary
protected KeyedObjects2Ddata
Storage for the data.
Constructor Summary
DefaultBoxAndWhiskerCategoryDataset()
Creates a new dataset.
Method Summary
voidadd(List list, Comparable rowKey, Comparable columnKey)
Adds a list of values relating to one box-and-whisker entity to the table.
voidadd(BoxAndWhiskerItem item, Comparable rowKey, Comparable columnKey)
Adds a list of values relating to one Box and Whisker entity to the table.
booleanequals(Object obj)
Tests this dataset 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.
BoxAndWhiskerItemgetItem(int row, int column)
Return an item from within the dataset.
NumbergetMaxOutlier(int row, int column)
Returns the maximum outlier (non farout) value for an item.
NumbergetMaxOutlier(Comparable rowKey, Comparable columnKey)
Returns the maximum outlier (non farout) value for an item.
NumbergetMaxRegularValue(int row, int column)
Returns the maximum regular (non outlier) value for an item.
NumbergetMaxRegularValue(Comparable rowKey, Comparable columnKey)
Returns the maximum regular (non outlier) value for an item.
NumbergetMeanValue(int row, int column)
Returns the mean value for an item.
NumbergetMeanValue(Comparable rowKey, Comparable columnKey)
Returns the mean value for an item.
NumbergetMedianValue(int row, int column)
Returns the median value for an item.
NumbergetMedianValue(Comparable rowKey, Comparable columnKey)
Returns the median value for an item.
NumbergetMinOutlier(int row, int column)
Returns the minimum outlier (non farout) value for an item.
NumbergetMinOutlier(Comparable rowKey, Comparable columnKey)
Returns the minimum outlier (non farout) value for an item.
NumbergetMinRegularValue(int row, int column)
Returns the minimum regular (non outlier) value for an item.
NumbergetMinRegularValue(Comparable rowKey, Comparable columnKey)
Returns the minimum regular (non outlier) value for an item.
ListgetOutliers(int row, int column)
Returns a list of outlier values for an item.
ListgetOutliers(Comparable rowKey, Comparable columnKey)
Returns a list of outlier values for an item.
NumbergetQ1Value(int row, int column)
Returns the first quartile value.
NumbergetQ1Value(Comparable rowKey, Comparable columnKey)
Returns the first quartile value.
NumbergetQ3Value(int row, int column)
Returns the third quartile value.
NumbergetQ3Value(Comparable rowKey, Comparable columnKey)
Returns the third quartile value.
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.
NumbergetValue(int row, int column)
Returns the value for an item.
NumbergetValue(Comparable rowKey, Comparable columnKey)
Returns the value for an item.

Field Detail

data

protected KeyedObjects2D data
Storage for the data.

Constructor Detail

DefaultBoxAndWhiskerCategoryDataset

public DefaultBoxAndWhiskerCategoryDataset()
Creates a new dataset.

Method Detail

add

public void add(List list, Comparable rowKey, Comparable columnKey)
Adds a list of values relating to one box-and-whisker entity to the table. The various median values are calculated.

Parameters: list a collection of values from which the various medians will be calculated. rowKey the row key. columnKey the column key.

add

public void add(BoxAndWhiskerItem item, Comparable rowKey, Comparable columnKey)
Adds a list of values relating to one Box and Whisker entity to the table. The various median values are calculated.

Parameters: item a box and whisker item (null not permitted). rowKey the row key. columnKey the column key.

equals

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

Parameters: obj the object to test against (null permitted).

Returns: A boolean.

getColumnCount

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

Returns: The column count.

getColumnIndex

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

Parameters: key the column key.

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.

getItem

public BoxAndWhiskerItem getItem(int row, int column)
Return an item from within the dataset.

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

Returns: The item.

getMaxOutlier

public Number getMaxOutlier(int row, int column)
Returns the maximum outlier (non farout) value for an item.

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

Returns: The maximum outlier.

getMaxOutlier

public Number getMaxOutlier(Comparable rowKey, Comparable columnKey)
Returns the maximum outlier (non farout) value for an item.

Parameters: rowKey the row key. columnKey the column key.

Returns: The maximum outlier.

getMaxRegularValue

public Number getMaxRegularValue(int row, int column)
Returns the maximum regular (non outlier) value for an item.

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

Returns: The maximum regular value.

getMaxRegularValue

public Number getMaxRegularValue(Comparable rowKey, Comparable columnKey)
Returns the maximum regular (non outlier) value for an item.

Parameters: rowKey the row key. columnKey the column key.

Returns: The maximum regular value.

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.

getMeanValue

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

Parameters: rowKey the row key. columnKey the column key.

Returns: The mean value.

getMedianValue

public Number getMedianValue(int row, int column)
Returns the median value for an item.

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

Returns: The median value.

getMedianValue

public Number getMedianValue(Comparable rowKey, Comparable columnKey)
Returns the median value for an item.

Parameters: rowKey the row key. columnKey the columnKey.

Returns: The median value.

getMinOutlier

public Number getMinOutlier(int row, int column)
Returns the minimum outlier (non farout) value for an item.

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

Returns: The minimum outlier.

getMinOutlier

public Number getMinOutlier(Comparable rowKey, Comparable columnKey)
Returns the minimum outlier (non farout) value for an item.

Parameters: rowKey the row key. columnKey the column key.

Returns: The minimum outlier.

getMinRegularValue

public Number getMinRegularValue(int row, int column)
Returns the minimum regular (non outlier) value for an item.

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

Returns: The minimum regular value.

getMinRegularValue

public Number getMinRegularValue(Comparable rowKey, Comparable columnKey)
Returns the minimum regular (non outlier) value for an item.

Parameters: rowKey the row key. columnKey the column key.

Returns: The minimum regular value.

getOutliers

public List getOutliers(int row, int column)
Returns a list of outlier values for an item.

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

Returns: A list of outlier values.

getOutliers

public List getOutliers(Comparable rowKey, Comparable columnKey)
Returns a list of outlier values for an item.

Parameters: rowKey the row key. columnKey the column key.

Returns: A list of outlier values.

getQ1Value

public Number getQ1Value(int row, int column)
Returns the first quartile value.

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

Returns: The first quartile value.

getQ1Value

public Number getQ1Value(Comparable rowKey, Comparable columnKey)
Returns the first quartile value.

Parameters: rowKey the row key. columnKey the column key.

Returns: The first quartile value.

getQ3Value

public Number getQ3Value(int row, int column)
Returns the third quartile value.

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

Returns: The third quartile value.

getQ3Value

public Number getQ3Value(Comparable rowKey, Comparable columnKey)
Returns the third quartile value.

Parameters: rowKey the row key. columnKey the column key.

Returns: The third quartile value.

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.

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.

getRowCount

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

Returns: The row count.

getRowIndex

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

Parameters: key the row key.

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.

getValue

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

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

Returns: The value.

getValue

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

Parameters: rowKey the row key. columnKey the columnKey.

Returns: The value.