Package org.jfree.data.general
Class AbstractSeriesDataset
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
- All Implemented Interfaces:
ObjectInputValidation
,Serializable
,Cloneable
,EventListener
,Dataset
,SeriesChangeListener
,SeriesDataset
- Direct Known Subclasses:
AbstractXYDataset
,DefaultIntervalCategoryDataset
,TaskSeriesCollection
public abstract class AbstractSeriesDataset
extends AbstractDataset
implements SeriesDataset, SeriesChangeListener, Serializable
An abstract implementation of the
SeriesDataset
interface,
containing a mechanism for registering change listeners.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
Returns the number of series in the dataset.abstract Comparable
getSeriesKey
(int series) Returns the key for a series.int
indexOf
(Comparable seriesKey) Returns the index of the named series, or -1.void
seriesChanged
(SeriesChangeEvent event) Called when a series belonging to the dataset changes.Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, canEqual, clone, equals, fireDatasetChanged, getGroup, getNotify, hashCode, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
-
Constructor Details
-
AbstractSeriesDataset
protected AbstractSeriesDataset()Creates a new dataset.
-
-
Method Details
-
getSeriesCount
Returns the number of series in the dataset.- Specified by:
getSeriesCount
in interfaceSeriesDataset
- Returns:
- The series count.
-
getSeriesKey
Returns the key for a series.If
series
is not within the specified range, the implementing method should throw anIndexOutOfBoundsException
(preferred) or anIllegalArgumentException
.- Specified by:
getSeriesKey
in interfaceSeriesDataset
- Parameters:
series
- the series index (in the range0
togetSeriesCount() - 1
).- Returns:
- The series key.
-
indexOf
Returns the index of the named series, or -1.- Specified by:
indexOf
in interfaceSeriesDataset
- Parameters:
seriesKey
- the series key (null
permitted).- Returns:
- The index.
-
seriesChanged
Called when a series belonging to the dataset changes.- Specified by:
seriesChanged
in interfaceSeriesChangeListener
- Parameters:
event
- information about the change.
-