java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDataset
- All Implemented Interfaces:
ObjectInputValidation
,Serializable
,Cloneable
,PublicCloneable
,CategoryDataset
,Dataset
,KeyedValues2D
,RangeInfo
,BoxAndWhiskerCategoryDataset
,Values2D
public class DefaultBoxAndWhiskerCategoryDataset
extends AbstractDataset
implements BoxAndWhiskerCategoryDataset, RangeInfo, PublicCloneable
A convenience class that provides a default implementation of the
BoxAndWhiskerCategoryDataset
interface.- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(List list, Comparable rowKey, Comparable columnKey) Adds a list of values relating to one box-and-whisker entity to the table.void
add
(BoxAndWhiskerItem item, Comparable rowKey, Comparable columnKey) Adds a list of values relating to one Box and Whisker entity to the table.void
clear()
Clears all data from the dataset and sends aDatasetChangeEvent
to all registered listeners.clone()
Returns a clone of this dataset.boolean
Tests this dataset for equality with an arbitrary object.int
Returns the number of columns in the table.int
getColumnIndex
(Comparable key) Returns the column index for a given key.getColumnKey
(int column) Returns a column key.Returns the column keys.getItem
(int row, int column) Return an item from within the dataset.getMaxOutlier
(int row, int column) Returns the maximum outlier (non farout) value for an item.getMaxOutlier
(Comparable rowKey, Comparable columnKey) Returns the maximum outlier (non farout) value for an item.getMaxRegularValue
(int row, int column) Returns the maximum regular (non outlier) value for an item.getMaxRegularValue
(Comparable rowKey, Comparable columnKey) Returns the maximum regular (non outlier) value for an item.getMeanValue
(int row, int column) Returns the mean value for an item.getMeanValue
(Comparable rowKey, Comparable columnKey) Returns the mean value for an item.getMedianValue
(int row, int column) Returns the median value for an item.getMedianValue
(Comparable rowKey, Comparable columnKey) Returns the median value for an item.getMinOutlier
(int row, int column) Returns the minimum outlier (non farout) value for an item.getMinOutlier
(Comparable rowKey, Comparable columnKey) Returns the minimum outlier (non farout) value for an item.getMinRegularValue
(int row, int column) Returns the minimum regular (non outlier) value for an item.getMinRegularValue
(Comparable rowKey, Comparable columnKey) Returns the minimum regular (non outlier) value for an item.getOutliers
(int row, int column) Returns a list of outlier values for an item.getOutliers
(Comparable rowKey, Comparable columnKey) Returns a list of outlier values for an item.getQ1Value
(int row, int column) Returns the first quartile value.getQ1Value
(Comparable rowKey, Comparable columnKey) Returns the first quartile value.getQ3Value
(int row, int column) Returns the third quartile value.getQ3Value
(Comparable rowKey, Comparable columnKey) Returns the third quartile value.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
Returns the number of rows in the table.int
getRowIndex
(Comparable key) Returns the row index for a given key.getRowKey
(int row) Returns a row key.Returns the row keys.getValue
(int row, int column) Returns the value for an item.getValue
(Comparable rowKey, Comparable columnKey) Returns the value for an item.void
remove
(Comparable rowKey, Comparable columnKey) Removes an item from the dataset and sends aDatasetChangeEvent
to all registered listeners.void
removeColumn
(int columnIndex) Removes a column from the dataset and sends aDatasetChangeEvent
to all registered listeners.void
removeColumn
(Comparable columnKey) Removes a column from the dataset and sends aDatasetChangeEvent
to all registered listeners.void
removeRow
(int rowIndex) Removes a row from the dataset and sends aDatasetChangeEvent
to all registered listeners.void
removeRow
(Comparable rowKey) Removes a row from the dataset and sends aDatasetChangeEvent
to all registered listeners.Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, 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
-
Field Details
-
data
Storage for the data.
-
-
Constructor Details
-
DefaultBoxAndWhiskerCategoryDataset
public DefaultBoxAndWhiskerCategoryDataset()Creates a new dataset.
-
-
Method Details
-
add
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 (null
not permitted).columnKey
- the column key (null
not permitted).- See Also:
-
add
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 (null
not permitted).columnKey
- the column key (null
not permitted).- See Also:
-
remove
Removes an item from the dataset and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
rowKey
- the row key (null
not permitted).columnKey
- the column key (null
not permitted).- See Also:
-
removeRow
public void removeRow(int rowIndex) Removes a row from the dataset and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
rowIndex
- the row index.- See Also:
-
removeRow
Removes a row from the dataset and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
rowKey
- the row key.- See Also:
-
removeColumn
public void removeColumn(int columnIndex) Removes a column from the dataset and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
columnIndex
- the column index.- See Also:
-
removeColumn
Removes a column from the dataset and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
columnKey
- the column key.- See Also:
-
clear
public void clear()Clears all data from the dataset and sends aDatasetChangeEvent
to all registered listeners. -
getItem
Return an item from within the dataset.- Parameters:
row
- the row index.column
- the column index.- Returns:
- The item.
-
getValue
Returns the value for an item. -
getValue
Returns the value for an item.- Specified by:
getValue
in interfaceKeyedValues2D
- Parameters:
rowKey
- the row key.columnKey
- the columnKey.- Returns:
- The value.
- See Also:
-
getMeanValue
Returns the mean value for an item.- Specified by:
getMeanValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The mean value.
- See Also:
-
getMeanValue
Returns the mean value for an item.- Specified by:
getMeanValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- The mean value.
- See Also:
-
getMedianValue
Returns the median value for an item.- Specified by:
getMedianValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The median value.
- See Also:
-
getMedianValue
Returns the median value for an item.- Specified by:
getMedianValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the columnKey.- Returns:
- The median value.
- See Also:
-
getQ1Value
Returns the first quartile value.- Specified by:
getQ1Value
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The first quartile value.
- See Also:
-
getQ1Value
Returns the first quartile value.- Specified by:
getQ1Value
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- The first quartile value.
- See Also:
-
getQ3Value
Returns the third quartile value.- Specified by:
getQ3Value
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The third quartile value.
- See Also:
-
getQ3Value
Returns the third quartile value.- Specified by:
getQ3Value
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- The third quartile value.
- See Also:
-
getColumnIndex
Returns the column index for a given key.- Specified by:
getColumnIndex
in interfaceKeyedValues2D
- Parameters:
key
- the column key (null
not permitted).- Returns:
- The column index.
- See Also:
-
getColumnKey
Returns a column key.- Specified by:
getColumnKey
in interfaceKeyedValues2D
- Parameters:
column
- the column index (zero-based).- Returns:
- The column key.
- See Also:
-
getColumnKeys
Returns the column keys.- Specified by:
getColumnKeys
in interfaceKeyedValues2D
- Returns:
- The keys.
- See Also:
-
getRowIndex
Returns the row index for a given key.- Specified by:
getRowIndex
in interfaceKeyedValues2D
- Parameters:
key
- the row key (null
not permitted).- Returns:
- The row index.
- See Also:
-
getRowKey
Returns a row key.- Specified by:
getRowKey
in interfaceKeyedValues2D
- Parameters:
row
- the row index (zero-based).- Returns:
- The row key.
- See Also:
-
getRowKeys
Returns the row keys.- Specified by:
getRowKeys
in interfaceKeyedValues2D
- Returns:
- The keys.
- See Also:
-
getRowCount
public int getRowCount()Returns the number of rows in the table.- Specified by:
getRowCount
in interfaceValues2D
- Returns:
- The row count.
- See Also:
-
getColumnCount
public int getColumnCount()Returns the number of columns in the table.- Specified by:
getColumnCount
in interfaceValues2D
- Returns:
- The column count.
- See Also:
-
getRangeLowerBound
public double getRangeLowerBound(boolean includeInterval) Returns the minimum y-value in the dataset.- Specified by:
getRangeLowerBound
in 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:
getRangeUpperBound
in 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 range of the values in this dataset's range.- Specified by:
getRangeBounds
in interfaceRangeInfo
- Parameters:
includeInterval
- a flag that determines whether or not the y-interval is taken into account.- Returns:
- The range.
-
getMinRegularValue
Returns the minimum regular (non outlier) value for an item.- Specified by:
getMinRegularValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The minimum regular value.
- See Also:
-
getMinRegularValue
Returns the minimum regular (non outlier) value for an item.- Specified by:
getMinRegularValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- The minimum regular value.
- See Also:
-
getMaxRegularValue
Returns the maximum regular (non outlier) value for an item.- Specified by:
getMaxRegularValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The maximum regular value.
- See Also:
-
getMaxRegularValue
Returns the maximum regular (non outlier) value for an item.- Specified by:
getMaxRegularValue
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- The maximum regular value.
- See Also:
-
getMinOutlier
Returns the minimum outlier (non farout) value for an item.- Specified by:
getMinOutlier
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The minimum outlier.
- See Also:
-
getMinOutlier
Returns the minimum outlier (non farout) value for an item.- Specified by:
getMinOutlier
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- The minimum outlier.
- See Also:
-
getMaxOutlier
Returns the maximum outlier (non farout) value for an item.- Specified by:
getMaxOutlier
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- The maximum outlier.
- See Also:
-
getMaxOutlier
Returns the maximum outlier (non farout) value for an item.- Specified by:
getMaxOutlier
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- The maximum outlier.
- See Also:
-
getOutliers
Returns a list of outlier values for an item.- Specified by:
getOutliers
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).- Returns:
- A list of outlier values.
- See Also:
-
getOutliers
Returns a list of outlier values for an item.- Specified by:
getOutliers
in interfaceBoxAndWhiskerCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.- Returns:
- A list of outlier values.
- See Also:
-
equals
Tests this dataset for equality with an arbitrary object. -
clone
Returns a clone of this dataset.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classAbstractDataset
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if cloning is not possible.
-