org.jfree.data.xy

Class MatrixSeriesCollection

public class MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, Serializable

Represents a collection of MatrixSeries that can be used as a dataset.

See Also: MatrixSeries

Constructor Summary
MatrixSeriesCollection()
Constructs an empty dataset.
MatrixSeriesCollection(MatrixSeries series)
Constructs a dataset and populates it with a single matrix series.
Method Summary
voidaddSeries(MatrixSeries 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.
MatrixSeriesgetSeries(int seriesIndex)
Returns the series having the specified index.
intgetSeriesCount()
Returns the number of series in the collection.
ComparablegetSeriesKey(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(MatrixSeries series)
Removes a series from the collection.
voidremoveSeries(int seriesIndex)
Removes a series from 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

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.

Throws: IllegalArgumentException

clone

public Object clone()
Returns a clone of this instance.

Returns: A clone.

Throws: CloneNotSupportedException if there is a problem.

equals

public boolean equals(Object obj)
Tests this collection for equality with an arbitrary object.

Parameters: obj the object.

Returns: A boolean.

getItemCount

public int getItemCount(int seriesIndex)
Returns the number of items in the specified series.

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.

Throws: IllegalArgumentException

getSeriesCount

public int getSeriesCount()
Returns the number of series in the collection.

Returns: The number of series in the collection.

getSeriesKey

public Comparable getSeriesKey(int seriesIndex)
Returns the key for a series.

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.

Parameters: seriesIndex zero-based series index. itemIndex zero-based item index.

Returns: The j index value for the specified matrix item.

See Also: XYDataset

getY

public Number getY(int seriesIndex, int itemIndex)
Returns the i index value of the specified Mij matrix item in the specified matrix series.

Parameters: seriesIndex zero-based series index. itemIndex zero-based item index.

Returns: The i index value for the specified matrix item.

See Also: XYDataset

getZ

public Number getZ(int seriesIndex, int itemIndex)
Returns the Mij item value of the specified Mij matrix item in the specified matrix series.

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

hashCode

public int hashCode()
Returns a hash code.

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

public void removeSeries(MatrixSeries series)
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