Module org.jfree.chart
Package org.jfree.data.xy
Class YIntervalSeriesCollection<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<S>
-
- org.jfree.data.xy.YIntervalSeriesCollection<S>
-
- Type Parameters:
S- The type for the series keys.
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,PublicCloneable,Dataset,SeriesChangeListener,SeriesDataset<S>,IntervalXYDataset<S>,XYDataset<S>
public class YIntervalSeriesCollection<S extends Comparable<S>> extends AbstractIntervalXYDataset<S> implements IntervalXYDataset<S>, PublicCloneable, Serializable
A collection ofYIntervalSeriesobjects.- See Also:
YIntervalSeries, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description YIntervalSeriesCollection()Creates a new instance ofYIntervalSeriesCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSeries(YIntervalSeries<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.NumbergetEndY(int series, int item)Returns the end y-value for an item within a series.doublegetEndYValue(int series, int item)Returns the end y-value (as a double primitive) for an item within a series.intgetItemCount(int series)Returns the number of items in the specified series.YIntervalSeries<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.NumbergetStartY(int series, int item)Returns the start y-value for an item within a series.doublegetStartYValue(int series, int item)Returns the start y-value (as a double primitive) 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(YIntervalSeries<S> series)Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.-
Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset
getEndXValue, getStartXValue
-
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
getEndXValue, getStartXValue
-
Methods inherited from interface org.jfree.data.general.SeriesDataset
indexOf
-
Methods inherited from interface org.jfree.data.xy.XYDataset
getDomainOrder, getXValue
-
-
-
-
Constructor Detail
-
YIntervalSeriesCollection
public YIntervalSeriesCollection()
Creates a new instance ofYIntervalSeriesCollection.
-
-
Method Detail
-
addSeries
public void addSeries(YIntervalSeries<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<S extends Comparable<S>>- Returns:
- The series count.
-
getSeries
public YIntervalSeries<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<S extends Comparable<S>>- 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.
-
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<S extends Comparable<S>>- 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:
getStartYValuein interfaceIntervalXYDataset<S extends Comparable<S>>- Overrides:
getStartYValuein classAbstractIntervalXYDataset<S extends Comparable<S>>- Parameters:
series- the series index (zero-based).item- the item index (zero-based).- Returns:
- The value.
- See Also:
IntervalXYDataset.getStartY(int, int)
-
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:
getEndYValuein interfaceIntervalXYDataset<S extends Comparable<S>>- Overrides:
getEndYValuein classAbstractIntervalXYDataset<S extends Comparable<S>>- Parameters:
series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The value.
- See Also:
IntervalXYDataset.getEndY(int, int)
-
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. This method maps directly togetX(int, int).- 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. This method maps directly togetX(int, int).- 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.- 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.- 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).
-
removeSeries
public void removeSeries(YIntervalSeries<S> series)
Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.- Parameters:
series- the series (nullnot permitted).
-
removeAllSeries
public void removeAllSeries()
Removes all the series from the collection and sends aDatasetChangeEventto all registered listeners.
-
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.
-
-