Module org.jfree.chart
Package org.jfree.data.xy
Class XIntervalSeriesCollection<S extends Comparable<S>>
- java.lang.Object
-
- org.jfree.data.general.AbstractDataset
-
- org.jfree.data.general.AbstractSeriesDataset<S>
-
- org.jfree.data.xy.AbstractXYDataset<S>
-
- org.jfree.data.xy.AbstractIntervalXYDataset
-
- org.jfree.data.xy.XIntervalSeriesCollection<S>
-
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,PublicCloneable,Dataset,SeriesChangeListener,SeriesDataset,IntervalXYDataset,XYDataset
public class XIntervalSeriesCollection<S extends Comparable<S>> extends AbstractIntervalXYDataset implements IntervalXYDataset, PublicCloneable, Serializable
A collection ofXIntervalSeriesobjects.- Since:
- 1.0.3
- See Also:
XIntervalSeries, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XIntervalSeriesCollection()Creates a newXIntervalSeriesCollectioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSeries(XIntervalSeries<S> series)Adds a series to the collection and sends aDatasetChangeEventto all registered listeners.Objectclone()Returns a clone of this instance.booleanequals(Object obj)Tests this instance for equality with an arbitrary object.NumbergetEndX(int series, int item)Returns the end x-value for an item within a series.doublegetEndXValue(int series, int item)Returns the end x-value (as a double primitive) for an item within a series.NumbergetEndY(int series, int item)Returns the end y-value for an item within a series.intgetItemCount(int series)Returns the number of items in the specified series.XIntervalSeries<S>getSeries(int series)Returns a series from the collection.intgetSeriesCount()Returns the number of series in the collection.SgetSeriesKey(int series)Returns the key for a series.NumbergetStartX(int series, int item)Returns the start x-value for an item within a series.doublegetStartXValue(int series, int item)Returns the start x-value (as a double primitive) for an item within a series.NumbergetStartY(int series, int item)Returns the start y-value for an item within a series.NumbergetX(int series, int item)Returns the x-value for an item within a series.NumbergetY(int series, int item)Returns the y-value for an item within a series.doublegetYValue(int series, int item)Returns the y-value (as a double primitive) for an item within a series.voidremoveAllSeries()Removes all the series from the collection and sends aDatasetChangeEventto all registered listeners.voidremoveSeries(int series)Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.voidremoveSeries(XIntervalSeries<S> series)Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.-
Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset
getEndYValue, getStartYValue
-
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, getNotify, hasListener, notifyListeners, removeChangeListener, 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, removeChangeListener
-
Methods inherited from interface org.jfree.data.xy.IntervalXYDataset
getEndYValue, getStartYValue
-
Methods inherited from interface org.jfree.data.general.SeriesDataset
indexOf
-
Methods inherited from interface org.jfree.data.xy.XYDataset
getDomainOrder, getXValue
-
-
-
-
Constructor Detail
-
XIntervalSeriesCollection
public XIntervalSeriesCollection()
Creates a newXIntervalSeriesCollectioninstance.
-
-
Method Detail
-
addSeries
public void addSeries(XIntervalSeries<S> series)
Adds a series to the collection and sends aDatasetChangeEventto all registered listeners.- Parameters:
series- the series (nullnot permitted).
-
getSeriesCount
public int getSeriesCount()
Returns the number of series in the collection.- Specified by:
getSeriesCountin interfaceSeriesDataset<S extends Comparable<S>>- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- The series count.
-
getSeries
public XIntervalSeries<S> getSeries(int series)
Returns a series from the collection.- Parameters:
series- the series index (zero-based).- Returns:
- The series.
- Throws:
IllegalArgumentException- ifseriesis not in the range0togetSeriesCount() - 1.
-
getSeriesKey
public S getSeriesKey(int series)
Returns the key for a series.- Specified by:
getSeriesKeyin interfaceSeriesDataset<S extends Comparable<S>>- Specified by:
getSeriesKeyin classAbstractSeriesDataset- Parameters:
series- the series index (in the range0togetSeriesCount() - 1).- Returns:
- The key for a series.
- Throws:
IllegalArgumentException- ifseriesis not in the specified range.
-
getItemCount
public int getItemCount(int series)
Returns the number of items in the specified series.- Specified by:
getItemCountin interfaceXYDataset<S extends Comparable<S>>- Parameters:
series- the series (zero-based index).- Returns:
- The item count.
- Throws:
IllegalArgumentException- ifseriesis not in the range0togetSeriesCount() - 1.
-
getX
public Number getX(int series, int item)
Returns the x-value for an item within a series.- Specified by:
getXin interfaceXYDataset<S extends Comparable<S>>- Parameters:
series- the series index.item- the item index.- Returns:
- The x-value.
-
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:
getStartXValuein interfaceIntervalXYDataset<S extends Comparable<S>>- Overrides:
getStartXValuein classAbstractIntervalXYDataset- Parameters:
series- the series index (zero-based).item- the item index (zero-based).- Returns:
- The value.
- See Also:
IntervalXYDataset.getStartX(int, int)
-
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:
getEndXValuein interfaceIntervalXYDataset<S extends Comparable<S>>- Overrides:
getEndXValuein classAbstractIntervalXYDataset- Parameters:
series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The value.
- See Also:
IntervalXYDataset.getEndX(int, int)
-
getYValue
public double getYValue(int series, int item)
Returns the y-value (as a double primitive) for an item within a series.- Specified by:
getYValuein interfaceXYDataset<S extends Comparable<S>>- Overrides:
getYValuein classAbstractXYDataset- Parameters:
series- the series index (zero-based).item- the item index (zero-based).- Returns:
- The value.
-
getY
public Number getY(int series, int item)
Returns the y-value for an item within a series.- Specified by:
getYin interfaceXYDataset<S extends Comparable<S>>- Parameters:
series- the series index.item- the item index.- Returns:
- The y-value.
-
getStartX
public Number getStartX(int series, int item)
Returns the start x-value for an item within a series.- Specified by:
getStartXin interfaceIntervalXYDataset<S extends Comparable<S>>- Parameters:
series- the series index.item- the item index.- Returns:
- The x-value.
-
getEndX
public Number getEndX(int series, int item)
Returns the end x-value for an item within a series.- Specified by:
getEndXin interfaceIntervalXYDataset<S extends Comparable<S>>- 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 togetY(int, int).- Specified by:
getStartYin interfaceIntervalXYDataset<S extends Comparable<S>>- Parameters:
series- the series index.item- the item index.- Returns:
- The start y-value.
-
getEndY
public Number getEndY(int series, int item)
Returns the end y-value for an item within a series. This method maps directly togetY(int, int).- Specified by:
getEndYin interfaceIntervalXYDataset<S extends Comparable<S>>- 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 aDatasetChangeEventto all registered listeners.- Parameters:
series- the series index (zero-based).- Since:
- 1.0.10
-
removeSeries
public void removeSeries(XIntervalSeries<S> series)
Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.- Parameters:
series- the series (nullnot permitted).- Since:
- 1.0.10
-
removeAllSeries
public void removeAllSeries()
Removes all the series from the collection and sends aDatasetChangeEventto all registered listeners.- Since:
- 1.0.10
-
equals
public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.
-
clone
public Object clone() throws CloneNotSupportedException
Returns a clone of this instance.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classAbstractDataset- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if there is a problem.
-
-