public class DefaultIntervalCategoryDataset extends AbstractSeriesDataset implements IntervalCategoryDataset
IntervalCategoryDataset interface.
The standard constructor accepts data in a two dimensional array where the first dimension is the series, and the second dimension is the category.
| Constructor and Description |
|---|
DefaultIntervalCategoryDataset(Comparable[] seriesKeys,
Comparable[] categoryKeys,
Number[][] starts,
Number[][] ends)
Constructs a DefaultIntervalCategoryDataset, populates it with data
from the arrays, and uses the supplied names for the series and the
supplied objects for the categories.
|
DefaultIntervalCategoryDataset(double[][] starts,
double[][] ends)
Creates a new dataset using the specified data values and automatically
generated series and category keys.
|
DefaultIntervalCategoryDataset(Number[][] starts,
Number[][] ends)
Constructs a dataset and populates it with data from the array.
|
DefaultIntervalCategoryDataset(String[] seriesNames,
Number[][] starts,
Number[][] ends)
Constructs a DefaultIntervalCategoryDataset, populates it with data
from the arrays, and uses the supplied names for the series.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a clone of this dataset.
|
boolean |
equals(Object obj)
Tests this dataset for equality with an arbitrary object.
|
int |
getCategoryCount()
Returns the number of categories in the dataset.
|
int |
getCategoryIndex(Comparable category)
Returns the index for the given category.
|
int |
getColumnCount()
Returns the number of categories in the dataset.
|
int |
getColumnIndex(Comparable columnKey)
Returns a column index.
|
Comparable |
getColumnKey(int column)
Returns a column key.
|
List |
getColumnKeys()
Returns a list of the categories in the dataset.
|
Number |
getEndValue(Comparable series,
Comparable category)
Returns the end data value for one category in a series.
|
Number |
getEndValue(int series,
int category)
Returns the end data value for one category in a series.
|
int |
getRowCount()
Returns the number of series in the dataset (possibly zero).
|
int |
getRowIndex(Comparable rowKey)
Returns a row index.
|
Comparable |
getRowKey(int row)
Returns the name of the specified series.
|
List |
getRowKeys()
Returns a list of the series in the dataset.
|
int |
getSeriesCount()
Returns the number of series in the dataset (possibly zero).
|
int |
getSeriesIndex(Comparable seriesKey)
Returns a series index.
|
Comparable |
getSeriesKey(int series)
Returns the name of the specified series.
|
Number |
getStartValue(Comparable series,
Comparable category)
Returns the start data value for one category in a series.
|
Number |
getStartValue(int series,
int category)
Returns the start data value for one category in a series.
|
Number |
getValue(Comparable series,
Comparable category)
Returns the data value for one category in a series.
|
Number |
getValue(int series,
int category)
Returns the data value for one category in a series.
|
void |
setCategoryKeys(Comparable[] categoryKeys)
Sets the categories for the dataset.
|
void |
setEndValue(int series,
Comparable category,
Number value)
Sets the end data value for one category in a series.
|
void |
setSeriesKeys(Comparable[] seriesKeys)
Sets the names of the series in the dataset.
|
void |
setStartValue(int series,
Comparable category,
Number value)
Sets the start data value for one category in a series.
|
indexOf, seriesChangedaddChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChangeListener, getGroup, removeChangeListener, setGrouppublic DefaultIntervalCategoryDataset(double[][] starts,
double[][] ends)
starts - the starting values for the intervals (null
not permitted).ends - the ending values for the intervals (null not
permitted).public DefaultIntervalCategoryDataset(Number[][] starts, Number[][] ends)
The arrays are indexed as data[series][category]. Series and category
names are automatically generated - you can change them using the
setSeriesKeys(Comparable[]) and
setCategoryKeys(Comparable[]) methods.
starts - the start values data.ends - the end values data.public DefaultIntervalCategoryDataset(String[] seriesNames, Number[][] starts, Number[][] ends)
Category names are generated automatically ("Category 1", "Category 2", etc).
seriesNames - the series names (if null, series names
will be generated automatically).starts - the start values data, indexed as data[series][category].ends - the end values data, indexed as data[series][category].public DefaultIntervalCategoryDataset(Comparable[] seriesKeys, Comparable[] categoryKeys, Number[][] starts, Number[][] ends)
seriesKeys - the series keys (if null, series keys
will be generated automatically).categoryKeys - the category keys (if null, category
keys will be generated automatically).starts - the start values data, indexed as data[series][category].ends - the end values data, indexed as data[series][category].public int getSeriesCount()
getSeriesCount in interface SeriesDatasetgetSeriesCount in class AbstractSeriesDatasetgetRowCount(),
getCategoryCount()public int getSeriesIndex(Comparable seriesKey)
seriesKey - the series key.getRowIndex(Comparable),
getSeriesKey(int)public Comparable getSeriesKey(int series)
getSeriesKey in interface SeriesDatasetgetSeriesKey in class AbstractSeriesDatasetseries - the index of the required series (zero-based).getSeriesIndex(Comparable)public void setSeriesKeys(Comparable[] seriesKeys)
seriesKeys - the new keys (null not permitted, the
length of the array must match the number of series in the
dataset).setCategoryKeys(Comparable[])public int getCategoryCount()
getColumnCount()public List getColumnKeys()
CategoryDataset interface.getColumnKeys in interface KeyedValues2DgetRowKeys()public void setCategoryKeys(Comparable[] categoryKeys)
categoryKeys - an array of objects representing the categories in
the dataset.getRowKeys(),
setSeriesKeys(Comparable[])public Number getValue(Comparable series, Comparable category)
This method is part of the CategoryDataset interface. Not particularly meaningful for this class...returns the end value.
getValue in interface KeyedValues2Dseries - The required series (zero based index).category - The required category.getEndValue(Comparable, Comparable)public Number getValue(int series, int category)
This method is part of the CategoryDataset interface. Not particularly meaningful for this class...returns the end value.
getValue in interface Values2Dseries - the required series (zero based index).category - the required category.getEndValue(int, int)public Number getStartValue(Comparable series, Comparable category)
getStartValue in interface IntervalCategoryDatasetseries - the required series.category - the required category.null).getStartValue(int, int)public Number getStartValue(int series, int category)
getStartValue in interface IntervalCategoryDatasetseries - the required series (zero based index).category - the required category.null).getStartValue(Comparable, Comparable)public Number getEndValue(Comparable series, Comparable category)
getEndValue in interface IntervalCategoryDatasetseries - the required series.category - the required category.getEndValue(int, int)public Number getEndValue(int series, int category)
getEndValue in interface IntervalCategoryDatasetseries - the required series (zero based index).category - the required category.getEndValue(Comparable, Comparable)public void setStartValue(int series,
Comparable category,
Number value)
series - the series (zero-based index).category - the category.value - The value.setEndValue(int, Comparable, Number)public void setEndValue(int series,
Comparable category,
Number value)
series - the series (zero-based index).category - the category.value - the value.setStartValue(int, Comparable, Number)public int getCategoryIndex(Comparable category)
category - the category (null not permitted).getColumnIndex(Comparable)public Comparable getColumnKey(int column)
getColumnKey in interface KeyedValues2Dcolumn - the column index.getRowKey(int)public int getColumnIndex(Comparable columnKey)
getColumnIndex in interface KeyedValues2DcolumnKey - the column key (null not permitted).getCategoryIndex(Comparable)public int getRowIndex(Comparable rowKey)
getRowIndex in interface KeyedValues2DrowKey - the row key.getSeriesIndex(Comparable)public List getRowKeys()
CategoryDataset interface.getRowKeys in interface KeyedValues2DgetColumnKeys()public Comparable getRowKey(int row)
getRowKey in interface KeyedValues2Drow - the index of the required row/series (zero-based).getColumnKey(int)public int getColumnCount()
CategoryDataset interface.getColumnCount in interface Values2DgetCategoryCount(),
getRowCount()public int getRowCount()
getRowCount in interface Values2DgetSeriesCount(),
getColumnCount()public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone in class AbstractDatasetCloneNotSupportedException - if there is a problem cloning the
dataset.Copyright © 2001–2017 JFree.org. All rights reserved.