Package org.jfree.data.statistics
Class DefaultMultiValueCategoryDataset
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.statistics.DefaultMultiValueCategoryDataset
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,PublicCloneable,CategoryDataset,Dataset,KeyedValues2D,RangeInfo,MultiValueCategoryDataset,Values2D
public class DefaultMultiValueCategoryDataset
extends AbstractDataset
implements MultiValueCategoryDataset, RangeInfo, PublicCloneable
A category dataset that defines multiple values for each item.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(List values, Comparable rowKey, Comparable columnKey) Adds a list of values to the dataset (nulland Double.NaN items are automatically removed) and sends aDatasetChangeEventto all registered listeners.clone()Returns a clone of this instance.booleanTests this dataset 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.getRangeBounds(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.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.getValue(int row, int column) Returns the average value for the specified item.getValue(Comparable row, Comparable column) Returns the average value for the specified item.getValues(int row, int column) Returns a list (possibly empty) of the values for the specified item.getValues(Comparable rowKey, Comparable columnKey) Returns a list (possibly empty) of the values for the specified item.Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, canEqual, fireDatasetChanged, getGroup, getNotify, hashCode, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
-
Field Details
-
data
Storage for the data.
-
-
Constructor Details
-
DefaultMultiValueCategoryDataset
public DefaultMultiValueCategoryDataset()Creates a new dataset.
-
-
Method Details
-
add
Adds a list of values to the dataset (nulland Double.NaN items are automatically removed) and sends aDatasetChangeEventto all registered listeners.- Parameters:
values- a list of values (nullnot permitted).rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).
-
getValues
Returns a list (possibly empty) of the values for the specified item. The returned list should be unmodifiable.- Specified by:
getValuesin interfaceMultiValueCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).- Returns:
- The list of values.
-
getValues
Returns a list (possibly empty) of the values for the specified item. The returned list should be unmodifiable.- Specified by:
getValuesin interfaceMultiValueCategoryDataset- Parameters:
rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).- Returns:
- The list of values.
-
getValue
Returns the average value for the specified item.- Specified by:
getValuein interfaceKeyedValues2D- Parameters:
row- the row key.column- the column key.- Returns:
- The average value.
-
getValue
Returns the average value for the specified item. -
getColumnIndex
Returns the column index for a given key.- Specified by:
getColumnIndexin interfaceKeyedValues2D- Parameters:
key- the column key.- 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.- 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
Returns the number of rows in the table.- Specified by:
getRowCountin interfaceValues2D- Returns:
- The row count.
-
getColumnCount
Returns the number of columns in the table.- Specified by:
getColumnCountin interfaceValues2D- Returns:
- The column count.
-
getRangeLowerBound
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.
-
getRangeUpperBound
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.
-
getRangeBounds
Returns the range of the values in this dataset's range.- 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 dataset for equality with an arbitrary object.- Overrides:
equalsin classAbstractDataset- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
clone
Returns a clone of this instance.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classAbstractDataset- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if the dataset cannot be cloned.
-