org.jfree.data.xy

Class XIntervalSeriesCollection

Implemented Interfaces:
Cloneable, Dataset, EventListener, IntervalXYDataset, ObjectInputValidation, Serializable, SeriesChangeListener, SeriesDataset, XYDataset

public class XIntervalSeriesCollection
extends AbstractIntervalXYDataset
implements IntervalXYDataset, Serializable

A collection of XIntervalSeries objects.
Since:
1.0.3
See Also:
XIntervalSeries

Constructor Summary

XIntervalSeriesCollection()
Creates a new instance of XIntervalSeriesCollection.

Method Summary

void
addSeries(XIntervalSeries series)
Adds a series to the collection and sends a DatasetChangeEvent to all registered listeners.
Object
clone()
Returns a clone of this instance.
boolean
equals(Object obj)
Tests this instance for equality with an arbitrary object.
Number
getEndX(int series, int item)
Returns the end x-value for an item within a series.
Number
getEndY(int series, int item)
Returns the end y-value for an item within a series.
int
getItemCount(int series)
Returns the number of items in the specified series.
XIntervalSeries
getSeries(int series)
Returns a series from the collection.
int
getSeriesCount()
Returns the number of series in the collection.
Comparable
getSeriesKey(int series)
Returns the key for a series.
Number
getStartX(int series, int item)
Returns the start x-value for an item within a series.
Number
getStartY(int series, int item)
Returns the start y-value for an item within a series.
Number
getX(int series, int item)
Returns the x-value for an item within a series.
Number
getY(int series, int item)
Returns the y-value for an item within a series.

Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset

getEndXValue, getEndYValue, getStartXValue, getStartYValue

Methods inherited from class org.jfree.data.xy.AbstractXYDataset

getDomainOrder, getXValue, getYValue

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

Constructor Details

XIntervalSeriesCollection

public XIntervalSeriesCollection()
Creates a new instance of XIntervalSeriesCollection.

Method Details

addSeries

public void addSeries(XIntervalSeries series)
Adds a series to the collection and sends a DatasetChangeEvent to all registered listeners.
Parameters:
series - the series (null not permitted).

clone

public Object clone()
            throws CloneNotSupportedException
Returns a clone of this instance.
Overrides:
clone in interface AbstractDataset
Returns:
A clone.

equals

public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

getEndX

public Number getEndX(int series,
                      int item)
Returns the end x-value for an item within a series.
Specified by:
getEndX in interface IntervalXYDataset
Parameters:
series - the series index.
item - the item index.
Returns:
The x-value.

getEndY

public Number getEndY(int series,
                      int item)
Returns the end y-value for an item within a series. This method maps directly to getY(int,int).
Specified by:
getEndY in interface IntervalXYDataset
Parameters:
series - the series index.
item - the item index.
Returns:
The end y-value.

getItemCount

public int getItemCount(int series)
Returns the number of items in the specified series.
Specified by:
getItemCount in interface XYDataset
Parameters:
series - the series (zero-based index).
Returns:
The item count.

getSeries

public XIntervalSeries getSeries(int series)
Returns a series from the collection.
Parameters:
series - the series index (zero-based).
Returns:
The series.

getSeriesCount

public int getSeriesCount()
Returns the number of series in the collection.
Specified by:
getSeriesCount in interface SeriesDataset
Overrides:
getSeriesCount in interface AbstractSeriesDataset
Returns:
The series count.

getSeriesKey

public Comparable getSeriesKey(int series)
Returns the key for a series.
Specified by:
getSeriesKey in interface SeriesDataset
Overrides:
getSeriesKey in interface AbstractSeriesDataset
Parameters:
series - the series index (in the range 0 to getSeriesCount() - 1).
Returns:
The key for a series.

getStartX

public Number getStartX(int series,
                        int item)
Returns the start x-value for an item within a series.
Specified by:
getStartX in interface IntervalXYDataset
Parameters:
series - the series index.
item - the item index.
Returns:
The x-value.

getStartY

public Number getStartY(int series,
                        int item)
Returns the start y-value for an item within a series. This method maps directly to getY(int,int).
Specified by:
getStartY in interface IntervalXYDataset
Parameters:
series - the series index.
item - the item index.
Returns:
The start y-value.

getX

public Number getX(int series,
                   int item)
Returns the x-value for an item within a series.
Specified by:
getX in interface XYDataset
Parameters:
series - the series index.
item - the item index.
Returns:
The x-value.

getY

public Number getY(int series,
                   int item)
Returns the y-value for an item within a series.
Specified by:
getY in interface XYDataset
Parameters:
series - the series index.
item - the item index.
Returns:
The y-value.