Package org.jfree.data
Class MatrixSeriesCollection
java.lang.Object
org.jfree.data.AbstractDataset
org.jfree.data.AbstractSeriesDataset
org.jfree.data.AbstractXYDataset
org.jfree.data.AbstractXYZDataset
org.jfree.data.MatrixSeriesCollection
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,Dataset,SeriesChangeListener,SeriesDataset,XYDataset,XYZDataset
public class MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, Serializable
Represents a collection of
MatrixSeries that can be used as a
dataset.- Author:
- Barak Naveh
- See Also:
MatrixSeries, Serialized Form
-
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
Modifier and Type Method Description voidaddSeries(MatrixSeries series)Adds a series to the collection.booleanequals(Object obj)Tests this collection for equality with an arbitrary object.intgetItemCount(int seriesIndex)Returns the number of items in the specified series.MatrixSeriesgetSeries(int seriesIndex)Returns the series having the specified index.intgetSeriesCount()Returns the number of series in the collection.StringgetSeriesName(int seriesIndex)Returns the name of a series.NumbergetXValue(int seriesIndex, int itemIndex)Returns the j index value of the specified Mij matrix item in the specified matrix series.NumbergetYValue(int seriesIndex, int itemIndex)Returns the i index value of the specified Mij matrix item in the specified matrix series.NumbergetZValue(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 series)Removes a series from the collection.Methods inherited from class org.jfree.data.AbstractXYZDataset
getZMethods inherited from class org.jfree.data.AbstractXYDataset
getX, getYMethods inherited from class org.jfree.data.AbstractSeriesDataset
seriesChangedMethods inherited from class org.jfree.data.AbstractDataset
addChangeListener, clone, getGroup, removeChangeListener, setGroup, validateObjectMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroupMethods inherited from interface org.jfree.data.XYZDataset
getZ
-
Constructor Details
-
MatrixSeriesCollection
public MatrixSeriesCollection()Constructs an empty dataset. -
MatrixSeriesCollection
Constructs a dataset and populates it with a single matrix series.- Parameters:
series- the time series.
-
-
Method Details
-
getItemCount
public int getItemCount(int seriesIndex)Returns the number of items in the specified series.- Specified by:
getItemCountin interfaceXYDataset- Parameters:
seriesIndex- zero-based series index.- Returns:
- the number of items in the specified series.
-
getSeries
Returns the series having the specified index.- Parameters:
seriesIndex- zero-based series index.- Returns:
- The series.
- Throws:
IllegalArgumentException
-
getSeriesCount
public int getSeriesCount()Returns the number of series in the collection.- Specified by:
getSeriesCountin interfaceSeriesDataset- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- the number of series in the collection.
-
getSeriesName
Returns the name of a series.- Specified by:
getSeriesNamein interfaceSeriesDataset- Specified by:
getSeriesNamein classAbstractSeriesDataset- Parameters:
seriesIndex- zero-based series index.- Returns:
- the name of a series.
-
getXValue
Returns the j index value of the specified Mij matrix item in the specified matrix series.- Specified by:
getXValuein 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)
-
getYValue
Returns the i index value of the specified Mij matrix item in the specified matrix series.- Specified by:
getYValuein 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)
-
getZValue
Returns the Mij item value of the specified Mij matrix item in the specified matrix series.- Specified by:
getZValuein 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
Adds a series to the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
series- the series.- Throws:
IllegalArgumentException
-
equals
Tests this collection for equality with an arbitrary object. -
hashCode
public int hashCode()Returns a hash code. -
removeAllSeries
public void removeAllSeries()Removes all the series from the collection.Notifies all registered listeners that the dataset has changed.
-
removeSeries
Removes a series from the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
series- the series.- Throws:
IllegalArgumentException
-
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).- Throws:
IllegalArgumentException
-