Package org.jfree.data.xy
Class MatrixSeriesCollection
- java.lang.Object
-
- org.jfree.data.general.AbstractDataset
-
- org.jfree.data.general.AbstractSeriesDataset
-
- org.jfree.data.xy.AbstractXYDataset
-
- org.jfree.data.xy.AbstractXYZDataset
-
- org.jfree.data.xy.MatrixSeriesCollection
-
- All Implemented Interfaces:
java.io.ObjectInputValidation
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,PublicCloneable
,Dataset
,SeriesChangeListener
,SeriesDataset
,XYDataset
,XYZDataset
public class MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, PublicCloneable, java.io.Serializable
Represents a collection ofMatrixSeries
that can be used as a dataset.- See Also:
MatrixSeries
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
For serialization.private java.util.List
seriesList
The series that are included in the collection.
-
Constructor Summary
Constructors Constructor Description MatrixSeriesCollection()
Constructs an empty dataset.MatrixSeriesCollection(MatrixSeries 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 void
addSeries(MatrixSeries series)
Adds a series to the collection.java.lang.Object
clone()
Returns a clone of this instance.boolean
equals(java.lang.Object obj)
Tests this collection for equality with an arbitrary object.int
getItemCount(int seriesIndex)
Returns the number of items in the specified series.MatrixSeries
getSeries(int seriesIndex)
Returns the series having the specified index.int
getSeriesCount()
Returns the number of series in the collection.java.lang.Comparable
getSeriesKey(int seriesIndex)
Returns the key for a series.java.lang.Number
getX(int seriesIndex, int itemIndex)
Returns the j index value of the specified Mij matrix item in the specified matrix series.java.lang.Number
getY(int seriesIndex, int itemIndex)
Returns the i index value of the specified Mij matrix item in the specified matrix series.java.lang.Number
getZ(int seriesIndex, int itemIndex)
Returns the Mij item value of the specified Mij matrix item in the specified matrix series.int
hashCode()
Returns a hash code.void
removeAllSeries()
Removes all the series from the collection.void
removeSeries(int seriesIndex)
Removes a series from the collection.void
removeSeries(MatrixSeries 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, canEqual, fireDatasetChanged, getGroup, getNotify, 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.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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
seriesList
private java.util.List seriesList
The series that are included in the collection.
-
-
Constructor Detail
-
MatrixSeriesCollection
public MatrixSeriesCollection()
Constructs an empty dataset.
-
MatrixSeriesCollection
public MatrixSeriesCollection(MatrixSeries 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:
getItemCount
in interfaceXYDataset
- Parameters:
seriesIndex
- zero-based series index.- Returns:
- The number of items in the specified series.
-
getSeries
public MatrixSeries 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:
getSeriesCount
in interfaceSeriesDataset
- Specified by:
getSeriesCount
in classAbstractSeriesDataset
- Returns:
- The number of series in the collection.
-
getSeriesKey
public java.lang.Comparable getSeriesKey(int seriesIndex)
Returns the key for a series.- Specified by:
getSeriesKey
in interfaceSeriesDataset
- Specified by:
getSeriesKey
in classAbstractSeriesDataset
- Parameters:
seriesIndex
- zero-based series index.- Returns:
- The key for a series.
-
getX
public java.lang.Number getX(int seriesIndex, int itemIndex)
Returns the j index value of the specified Mij matrix item in the specified matrix series.- Specified by:
getX
in interfaceXYDataset
- 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 java.lang.Number getY(int seriesIndex, int itemIndex)
Returns the i index value of the specified Mij matrix item in the specified matrix series.- Specified by:
getY
in interfaceXYDataset
- 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 java.lang.Number getZ(int seriesIndex, int itemIndex)
Returns the Mij item value of the specified Mij matrix item in the specified matrix series.- Specified by:
getZ
in interfaceXYZDataset
- 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 series)
Adds a series to the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
series
- the series (null
not permitted).
-
equals
public boolean equals(java.lang.Object obj)
Tests this collection for equality with an arbitrary object.- Overrides:
equals
in classAbstractDataset
- Parameters:
obj
- the object.- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code.- Overrides:
hashCode
in classAbstractDataset
- Returns:
- A hash code.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns a clone of this instance.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classAbstractDataset
- Returns:
- A clone.
- Throws:
java.lang.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 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).
-
-