| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.jfree.data.general.AbstractDatasetorg.jfree.data.general.AbstractSeriesDatasetorg.jfree.data.category.DefaultIntervalCategoryDatasetpublic class DefaultIntervalCategoryDatasetextends AbstractSeriesDatasetimplements IntervalCategoryDatasetIntervalCategoryDataset 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 Summary | |
| |
| |
| |
| |
Method Summary | |
Object |
|
boolean |
|
List |
|
int |
|
int |
|
int |
|
int |
|
Comparable |
|
List |
|
Number |
|
Number |
|
int |
|
int |
|
int |
|
Comparable |
|
List |
|
List |
|
int |
|
int |
|
Comparable |
|
Number |
|
Number |
|
Number |
|
Number |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset | |
getSeriesCount, getSeriesKey, indexOf, seriesChanged | |
Methods inherited from class org.jfree.data.general.AbstractDataset | |
addChangeListener, clone, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObject | |
public 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.
- Parameters:
seriesKeys- the series keys (ifnull, series keys will be generated automatically).categoryKeys- the category keys (ifnull, 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 DefaultIntervalCategoryDataset(Number[][] starts, Number[][] ends)
Constructs a dataset and populates it with data from the array. The arrays are indexed as data[series][category]. Series and category names are automatically generated - you can change them using thesetSeriesKeys(Comparable[])andsetCategoryKeys(Comparable[])methods.
- Parameters:
starts- the start values data.ends- the end values data.
public 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. Category names are generated automatically ("Category 1", "Category 2", etc).
- Parameters:
seriesNames- the series names (ifnull, 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(double[][] starts, double[][] ends)
Creates a new dataset using the specified data values and automatically generated series and category keys.
- Parameters:
starts- the starting values for the intervals (nullnot permitted).ends- the ending values for the intervals (nullnot permitted).
public Object clone() throws CloneNotSupportedException
Returns a clone of this dataset.
- Overrides:
- clone in interface AbstractDataset
- Returns:
- A clone.
public boolean equals(Object obj)
Tests this dataset for equality with an arbitrary object.
- Parameters:
obj- the object (nullpermitted).
- Returns:
- A boolean.
public List getCategories()
Deprecated. Use
getColumnKeys()instead.Returns a list of the categories in the dataset.
- Returns:
- A list of the categories in the dataset.
public int getCategoryCount()
Returns the number of categories in the dataset.
- Returns:
- The number of categories in the dataset.
- See Also:
getColumnCount()
public int getCategoryIndex(Comparable category)
Returns the index for the given category.
- Parameters:
category- the category (nullnot permitted).
- Returns:
- The index.
- See Also:
getColumnIndex(Comparable)
public int getColumnCount()
Returns the number of categories in the dataset. This method is part of theCategoryDatasetinterface.
- Specified by:
- getColumnCount in interface Values2D
- Returns:
- The number of categories in the dataset.
- See Also:
getCategoryCount(),getRowCount()
public int getColumnIndex(Comparable columnKey)
Returns a column index.
- Specified by:
- getColumnIndex in interface KeyedValues2D
- Parameters:
columnKey- the column key (nullnot permitted).
- Returns:
- The column index.
- See Also:
getCategoryIndex(Comparable)
public Comparable getColumnKey(int column)
Returns a column key.
- Specified by:
- getColumnKey in interface KeyedValues2D
- Parameters:
column- the column index.
- Returns:
- The column key.
- See Also:
getRowKey(int)
public List getColumnKeys()
Returns a list of the categories in the dataset. This method supports theCategoryDatasetinterface.
- Specified by:
- getColumnKeys in interface KeyedValues2D
- Returns:
- A list of the categories in the dataset.
- See Also:
getRowKeys()
public Number getEndValue(Comparable series, Comparable category)
Returns the end data value for one category in a series.
- Specified by:
- getEndValue in interface IntervalCategoryDataset
- Parameters:
series- the required series.category- the required category.
- Returns:
- The end data value for one category in a series (null possible).
- See Also:
getEndValue(int,int)
public Number getEndValue(int series, int category)
Returns the end data value for one category in a series.
- Specified by:
- getEndValue in interface IntervalCategoryDataset
- Parameters:
series- the required series (zero based index).category- the required category.
- Returns:
- The end data value for one category in a series (null possible).
- See Also:
getEndValue(Comparable,Comparable)
public int getItemCount()
Deprecated. Use
getCategoryCount()instead.Returns the item count.
- Returns:
- The item count.
public int getRowCount()
Returns the number of series in the dataset (possibly zero).
- Specified by:
- getRowCount in interface Values2D
- Returns:
- The number of series in the dataset.
- See Also:
getSeriesCount(),getColumnCount()
public int getRowIndex(Comparable rowKey)
Returns a row index.
- Specified by:
- getRowIndex in interface KeyedValues2D
- Parameters:
rowKey- the row key.
- Returns:
- The row index.
- See Also:
getSeriesIndex(Comparable)
public Comparable getRowKey(int row)
Returns the name of the specified series.
- Specified by:
- getRowKey in interface KeyedValues2D
- Parameters:
row- the index of the required row/series (zero-based).
- Returns:
- The name of the specified series.
- See Also:
getColumnKey(int)
public List getRowKeys()
Returns a list of the series in the dataset. This method supports theCategoryDatasetinterface.
- Specified by:
- getRowKeys in interface KeyedValues2D
- Returns:
- A list of the series in the dataset.
- See Also:
getColumnKeys()
public List getSeries()
Deprecated. Use
getRowKeys()instead.Returns a list of the series in the dataset.
- Returns:
- A list of the series in the dataset.
public int getSeriesCount()
Returns the number of series in the dataset (possibly zero).
- Specified by:
- getSeriesCount in interface SeriesDataset
- Overrides:
- getSeriesCount in interface AbstractSeriesDataset
- Returns:
- The number of series in the dataset.
- See Also:
getRowCount(),getCategoryCount()
public int getSeriesIndex(Comparable seriesKey)
Returns a series index.
- Parameters:
seriesKey- the series key.
- Returns:
- The series index.
- See Also:
getRowIndex(Comparable),getSeriesKey(int)
public Comparable getSeriesKey(int series)
Returns the name of the specified series.
- Specified by:
- getSeriesKey in interface SeriesDataset
- Overrides:
- getSeriesKey in interface AbstractSeriesDataset
- Parameters:
series- the index of the required series (zero-based).
- Returns:
- The name of the specified series.
- See Also:
getSeriesIndex(Comparable)
public Number getStartValue(Comparable series, Comparable category)
Returns the start data value for one category in a series.
- Specified by:
- getStartValue in interface IntervalCategoryDataset
- Parameters:
series- the required series.category- the required category.
- Returns:
- The start data value for one category in a series (possibly
null).
- See Also:
getStartValue(int,int)
public Number getStartValue(int series, int category)
Returns the start data value for one category in a series.
- Specified by:
- getStartValue in interface IntervalCategoryDataset
- Parameters:
series- the required series (zero based index).category- the required category.
- Returns:
- The start data value for one category in a series (possibly
null).
- See Also:
getStartValue(Comparable,Comparable)
public Number getValue(Comparable series, Comparable category)
Returns the data value for one category in a series. This method is part of the CategoryDataset interface. Not particularly meaningful for this class...returns the end value.
- Specified by:
- getValue in interface KeyedValues2D
- Parameters:
series- The required series (zero based index).category- The required category.
- Returns:
- The data value for one category in a series (null possible).
- See Also:
getEndValue(Comparable,Comparable)
public Number getValue(int series, int category)
Returns the data value for one category in a series. This method is part of the CategoryDataset interface. Not particularly meaningful for this class...returns the end value.
- Parameters:
series- the required series (zero based index).category- the required category.
- Returns:
- The data value for one category in a series (null possible).
- See Also:
getEndValue(int,int)
public void setCategoryKeys(Comparable[] categoryKeys)
Sets the categories for the dataset.
- Parameters:
categoryKeys- an array of objects representing the categories in the dataset.
- See Also:
getRowKeys(),setSeriesKeys(Comparable[])
public void setEndValue(int series, Comparable category, Number value)
Sets the end data value for one category in a series.
- Parameters:
series- the series (zero-based index).category- the category.value- the value.
- See Also:
setStartValue(int,Comparable,Number)
public void setSeriesKeys(Comparable[] seriesKeys)
Sets the names of the series in the dataset.
- Parameters:
seriesKeys- the new keys (nullnot permitted, the length of the array must match the number of series in the dataset).
- See Also:
setCategoryKeys(Comparable[])
public void setStartValue(int series, Comparable category, Number value)
Sets the start data value for one category in a series.
- Parameters:
series- the series (zero-based index).category- the category.value- The value.
- See Also:
setEndValue(int,Comparable,Number)