java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
org.jfree.data.xy.AbstractXYDataset
org.jfree.data.xy.AbstractIntervalXYDataset
org.jfree.data.xy.XYIntervalSeriesCollection
- All Implemented Interfaces:
ObjectInputValidation
,Serializable
,Cloneable
,EventListener
,PublicCloneable
,Dataset
,SeriesChangeListener
,SeriesDataset
,IntervalXYDataset
,XYDataset
public class XYIntervalSeriesCollection
extends AbstractIntervalXYDataset
implements IntervalXYDataset, PublicCloneable, Serializable
A collection of
XYIntervalSeries
objects.- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new instance ofXIntervalSeriesCollection
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSeries
(XYIntervalSeries series) Adds a series to the collection and sends aDatasetChangeEvent
to all registered listeners.clone()
Returns a clone of this dataset.boolean
Tests this instance for equality with an arbitrary object.getEndX
(int series, int item) Returns the end x-value for an item within a series.double
getEndXValue
(int series, int item) Returns the end x-value (as a double primitive) for an item within a series.getEndY
(int series, int item) Returns the end y-value for an item within a series.double
getEndYValue
(int series, int item) Returns the end y-value (as a double primitive) for an item within a series.int
getItemCount
(int series) Returns the number of items in the specified series.getSeries
(int series) Returns a series from the collection.int
Returns the number of series in the collection.getSeriesKey
(int series) Returns the key for a series.getStartX
(int series, int item) Returns the start x-value for an item within a series.double
getStartXValue
(int series, int item) Returns the start x-value (as a double primitive) for an item within a series.getStartY
(int series, int item) Returns the start y-value for an item within a series.double
getStartYValue
(int series, int item) Returns the start y-value (as a double primitive) for an item within a series.getX
(int series, int item) Returns the x-value for an item within a series.getY
(int series, int item) Returns the y-value for an item within a series.double
getYValue
(int series, int item) Returns the y-value (as a double primitive) for an item within a series.void
Removes all the series from the collection and sends aDatasetChangeEvent
to all registered listeners.void
removeSeries
(int series) Removes a series from the collection and sends aDatasetChangeEvent
to all registered listeners.void
removeSeries
(XYIntervalSeries series) Removes a series from the collection and sends aDatasetChangeEvent
to all registered listeners.Methods inherited from class org.jfree.data.xy.AbstractXYDataset
getDomainOrder, getXValue
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset
indexOf, seriesChanged
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
Methods inherited from interface org.jfree.data.general.SeriesDataset
indexOf
Methods inherited from interface org.jfree.data.xy.XYDataset
getDomainOrder, getXValue
-
Constructor Details
-
XYIntervalSeriesCollection
public XYIntervalSeriesCollection()Creates a new instance ofXIntervalSeriesCollection
.
-
-
Method Details
-
addSeries
Adds a series to the collection and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
series
- the series (null
not permitted).
-
getSeriesCount
public int getSeriesCount()Returns the number of series in the collection.- Specified by:
getSeriesCount
in interfaceSeriesDataset
- Specified by:
getSeriesCount
in classAbstractSeriesDataset
- Returns:
- The series count.
-
getSeries
Returns a series from the collection.- Parameters:
series
- the series index (zero-based).- Returns:
- The series.
- Throws:
IllegalArgumentException
- ifseries
is not in the range0
togetSeriesCount() - 1
.
-
getSeriesKey
Returns the key for a series.- Specified by:
getSeriesKey
in interfaceSeriesDataset
- Specified by:
getSeriesKey
in classAbstractSeriesDataset
- Parameters:
series
- the series index (in the range0
togetSeriesCount() - 1
).- Returns:
- The key for a series.
- Throws:
IllegalArgumentException
- ifseries
is not in the specified range.
-
getItemCount
public int getItemCount(int series) Returns the number of items in the specified series.- Specified by:
getItemCount
in interfaceXYDataset
- Parameters:
series
- the series (zero-based index).- Returns:
- The item count.
- Throws:
IllegalArgumentException
- ifseries
is not in the range0
togetSeriesCount() - 1
.
-
getX
Returns the x-value for an item within a series. -
getStartXValue
public double getStartXValue(int series, int item) Returns the start x-value (as a double primitive) for an item within a series.- Specified by:
getStartXValue
in interfaceIntervalXYDataset
- Overrides:
getStartXValue
in classAbstractIntervalXYDataset
- Parameters:
series
- the series index (zero-based).item
- the item index (zero-based).- Returns:
- The value.
- See Also:
-
getEndXValue
public double getEndXValue(int series, int item) Returns the end x-value (as a double primitive) for an item within a series.- Specified by:
getEndXValue
in interfaceIntervalXYDataset
- Overrides:
getEndXValue
in classAbstractIntervalXYDataset
- Parameters:
series
- the series index (zero-based).item
- the item index (zero-based).- Returns:
- The value.
- See Also:
-
getYValue
public double getYValue(int series, int item) Returns the y-value (as a double primitive) for an item within a series.- Specified by:
getYValue
in interfaceXYDataset
- Overrides:
getYValue
in classAbstractXYDataset
- Parameters:
series
- the series index (zero-based).item
- the item index (zero-based).- Returns:
- The value.
-
getStartYValue
public double getStartYValue(int series, int item) Returns the start y-value (as a double primitive) for an item within a series.- Specified by:
getStartYValue
in interfaceIntervalXYDataset
- Overrides:
getStartYValue
in classAbstractIntervalXYDataset
- Parameters:
series
- the series index (zero-based).item
- the item index (zero-based).- Returns:
- The value.
- See Also:
-
getEndYValue
public double getEndYValue(int series, int item) Returns the end y-value (as a double primitive) for an item within a series.- Specified by:
getEndYValue
in interfaceIntervalXYDataset
- Overrides:
getEndYValue
in classAbstractIntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item (zero-based index).- Returns:
- The value.
- See Also:
-
getY
Returns the y-value for an item within a series. -
getStartX
Returns the start x-value for an item within a series.- Specified by:
getStartX
in interfaceIntervalXYDataset
- Parameters:
series
- the series index.item
- the item index.- Returns:
- The x-value.
-
getEndX
Returns the end x-value for an item within a series.- Specified by:
getEndX
in interfaceIntervalXYDataset
- Parameters:
series
- the series index.item
- the item index.- Returns:
- The x-value.
-
getStartY
Returns the start y-value for an item within a series. This method maps directly togetY(int, int)
.- Specified by:
getStartY
in interfaceIntervalXYDataset
- Parameters:
series
- the series index.item
- the item index.- Returns:
- The start y-value.
-
getEndY
Returns the end y-value for an item within a series. This method maps directly togetY(int, int)
.- Specified by:
getEndY
in interfaceIntervalXYDataset
- Parameters:
series
- the series index.item
- the item index.- Returns:
- The end y-value.
-
removeSeries
public void removeSeries(int series) Removes a series from the collection and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
series
- the series index (zero-based).
-
removeSeries
Removes a series from the collection and sends aDatasetChangeEvent
to all registered listeners.- Parameters:
series
- the series (null
not permitted).
-
removeAllSeries
public void removeAllSeries()Removes all the series from the collection and sends aDatasetChangeEvent
to all registered listeners. -
equals
Tests this instance 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 of this dataset.
- Throws:
CloneNotSupportedException
- if there is a problem cloning.
-