Package org.jfree.data.xy
Class XIntervalSeriesCollection
- 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.XIntervalSeriesCollection
-
- All Implemented Interfaces:
java.io.ObjectInputValidation,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,PublicCloneable,Dataset,SeriesChangeListener,SeriesDataset,IntervalXYDataset,XYDataset
public class XIntervalSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, PublicCloneable, java.io.Serializable
A collection ofXIntervalSeriesobjects.- See Also:
XIntervalSeries, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ListdataStorage for the data series.
-
Constructor Summary
Constructors Constructor Description XIntervalSeriesCollection()Creates a newXIntervalSeriesCollectioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSeries(XIntervalSeries series)Adds a series to the collection and sends aDatasetChangeEventto all registered listeners.java.lang.Objectclone()Returns a clone of this instance.booleanequals(java.lang.Object obj)Tests this instance for equality with an arbitrary object.java.lang.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.java.lang.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.XIntervalSeriesgetSeries(int series)Returns a series from the collection.intgetSeriesCount()Returns the number of series in the collection.java.lang.ComparablegetSeriesKey(int series)Returns the key for a series.java.lang.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.java.lang.NumbergetStartY(int series, int item)Returns the start y-value for an item within a series.java.lang.NumbergetX(int series, int item)Returns the x-value for an item within a series.java.lang.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 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, canEqual, 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
-
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
-
-
-
-
Method Detail
-
addSeries
public void addSeries(XIntervalSeries 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- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- The series count.
-
getSeries
public XIntervalSeries getSeries(int series)
Returns a series from the collection.- Parameters:
series- the series index (zero-based).- Returns:
- The series.
- Throws:
java.lang.IllegalArgumentException- ifseriesis not in the range0togetSeriesCount() - 1.
-
getSeriesKey
public java.lang.Comparable getSeriesKey(int series)
Returns the key for a series.- Specified by:
getSeriesKeyin interfaceSeriesDataset- Specified by:
getSeriesKeyin classAbstractSeriesDataset- Parameters:
series- the series index (in the range0togetSeriesCount() - 1).- Returns:
- The key for a series.
- Throws:
java.lang.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- Parameters:
series- the series (zero-based index).- Returns:
- The item count.
- Throws:
java.lang.IllegalArgumentException- ifseriesis not in the range0togetSeriesCount() - 1.
-
getX
public java.lang.Number getX(int series, int item)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:
getStartXValuein interfaceIntervalXYDataset- 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- 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- Overrides:
getYValuein classAbstractXYDataset- Parameters:
series- the series index (zero-based).item- the item index (zero-based).- Returns:
- The value.
-
getY
public java.lang.Number getY(int series, int item)Returns the y-value for an item within a series.
-
getStartX
public java.lang.Number getStartX(int series, int item)Returns the start x-value for an item within a series.- Specified by:
getStartXin interfaceIntervalXYDataset- Parameters:
series- the series index.item- the item index.- Returns:
- The x-value.
-
getEndX
public java.lang.Number getEndX(int series, int item)Returns the end x-value for an item within a series.- Specified by:
getEndXin interfaceIntervalXYDataset- Parameters:
series- the series index.item- the item index.- Returns:
- The x-value.
-
getStartY
public java.lang.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- Parameters:
series- the series index.item- the item index.- Returns:
- The start y-value.
-
getEndY
public java.lang.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- 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(XIntervalSeries 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(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.- Overrides:
equalsin classAbstractDataset- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionReturns a clone of this instance.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classAbstractDataset- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException- if there is a problem.
-
-