Module org.jfree.chart
Package org.jfree.data.xy
Class MatrixSeriesCollection<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.AbstractXYZDataset
-
- org.jfree.data.xy.MatrixSeriesCollection<S>
-
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,PublicCloneable,Dataset,SeriesChangeListener,SeriesDataset,XYDataset,XYZDataset
public class MatrixSeriesCollection<S extends Comparable<S>> extends AbstractXYZDataset implements XYZDataset, PublicCloneable, Serializable
Represents a collection ofMatrixSeriesthat can be used as a dataset.- See Also:
MatrixSeries, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MatrixSeriesCollection()Constructs an empty dataset.MatrixSeriesCollection(MatrixSeries<S> series)Constructs a dataset and populates it with a single matrix series.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSeries(MatrixSeries<S> series)Adds a series to the collection.Objectclone()Returns a clone of this instance.booleanequals(Object obj)Tests this collection for equality with an arbitrary object.intgetItemCount(int seriesIndex)Returns the number of items in the specified series.MatrixSeries<S>getSeries(int seriesIndex)Returns the series having the specified index.intgetSeriesCount()Returns the number of series in the collection.SgetSeriesKey(int seriesIndex)Returns the key for a series.NumbergetX(int seriesIndex, int itemIndex)Returns the j index value of the specified Mij matrix item in the specified matrix series.NumbergetY(int seriesIndex, int itemIndex)Returns the i index value of the specified Mij matrix item in the specified matrix series.NumbergetZ(int seriesIndex, int itemIndex)Returns the Mij item value of the specified Mij matrix item in the specified matrix series.inthashCode()Returns a hash code.voidremoveAllSeries()Removes all the series from the collection.voidremoveSeries(int seriesIndex)Removes a series from the collection.voidremoveSeries(MatrixSeries<S> series)Removes a series from the collection.-
Methods inherited from class org.jfree.data.xy.AbstractXYZDataset
getZValue
-
Methods inherited from class org.jfree.data.xy.AbstractXYDataset
getDomainOrder, getXValue, getYValue
-
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, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jfree.data.general.Dataset
addChangeListener, removeChangeListener
-
Methods inherited from interface org.jfree.data.general.SeriesDataset
indexOf
-
Methods inherited from interface org.jfree.data.xy.XYDataset
getDomainOrder, getXValue, getYValue
-
Methods inherited from interface org.jfree.data.xy.XYZDataset
getZValue
-
-
-
-
Constructor Detail
-
MatrixSeriesCollection
public MatrixSeriesCollection()
Constructs an empty dataset.
-
MatrixSeriesCollection
public MatrixSeriesCollection(MatrixSeries<S> series)
Constructs a dataset and populates it with a single matrix series.- Parameters:
series- the time series.
-
-
Method Detail
-
getItemCount
public int getItemCount(int seriesIndex)
Returns the number of items in the specified series.- Specified by:
getItemCountin interfaceXYDataset<S extends Comparable<S>>- Parameters:
seriesIndex- zero-based series index.- Returns:
- The number of items in the specified series.
-
getSeries
public MatrixSeries<S> getSeries(int seriesIndex)
Returns the series having the specified index.- Parameters:
seriesIndex- zero-based series index.- Returns:
- The series.
-
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 number of series in the collection.
-
getSeriesKey
public S getSeriesKey(int seriesIndex)
Returns the key for a series.- Specified by:
getSeriesKeyin interfaceSeriesDataset<S extends Comparable<S>>- Specified by:
getSeriesKeyin classAbstractSeriesDataset- Parameters:
seriesIndex- zero-based series index.- Returns:
- The key for a series.
-
getX
public Number getX(int seriesIndex, int itemIndex)
Returns the j index value of the specified Mij matrix item in the specified matrix series.- Specified by:
getXin interfaceXYDataset<S extends Comparable<S>>- Parameters:
seriesIndex- zero-based series index.itemIndex- zero-based item index.- Returns:
- The j index value for the specified matrix item.
- See Also:
XYDataset.getXValue(int, int)
-
getY
public Number getY(int seriesIndex, int itemIndex)
Returns the i index value of the specified Mij matrix item in the specified matrix series.- Specified by:
getYin interfaceXYDataset<S extends Comparable<S>>- Parameters:
seriesIndex- zero-based series index.itemIndex- zero-based item index.- Returns:
- The i index value for the specified matrix item.
- See Also:
XYDataset.getYValue(int, int)
-
getZ
public Number getZ(int seriesIndex, int itemIndex)
Returns the Mij item value of the specified Mij matrix item in the specified matrix series.- Specified by:
getZin interfaceXYZDataset<S extends Comparable<S>>- Parameters:
seriesIndex- the series (zero-based index).itemIndex- zero-based item index.- Returns:
- The Mij item value for the specified matrix item.
- See Also:
XYZDataset.getZValue(int, int)
-
addSeries
public void addSeries(MatrixSeries<S> series)
Adds a series to the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
series- the series (nullnot permitted).
-
equals
public boolean equals(Object obj)
Tests this collection for equality with an arbitrary object.
-
hashCode
public int hashCode()
Returns a hash code.
-
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.
-
removeAllSeries
public void removeAllSeries()
Removes all the series from the collection.Notifies all registered listeners that the dataset has changed.
-
removeSeries
public void removeSeries(MatrixSeries<S> series)
Removes a series from the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
series- the series (null).
-
removeSeries
public void removeSeries(int seriesIndex)
Removes a series from the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
seriesIndex- the series (zero based index).
-
-