## org.jfree.data.xy
Class VectorSeriesCollection

    java.lang.Object
      org.jfree.data.general.AbstractDataset
          org.jfree.data.general.AbstractSeriesDataset
              org.jfree.data.xy.AbstractXYDataset
                  org.jfree.data.xy.VectorSeriesCollection

All Implemented Interfaces:
  java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Dataset, SeriesChangeListener, SeriesDataset, VectorXYDataset, XYDataset, org.jfree.util.PublicCloneable

    public class VectorSeriesCollection

extends AbstractXYDataset
implements VectorXYDataset, org.jfree.util.PublicCloneable, java.io.Serializable

A collection of `VectorSeries` objects.

Since:
  1.0.6
See Also:
  Serialized Form

Constructor Summary
`VectorSeriesCollection()` Creates a new instance of `VectorSeriesCollection`.

Method Summary
`void` `addSeries(VectorSeries series)` Adds a series to the collection and sends a `DatasetChangeEvent` to all registered listeners.
`java.lang.Object` `clone()` Returns a clone of this instance.
`boolean` `equals(java.lang.Object obj)` Tests this instance for equality with an arbitrary object.
`int` `getItemCount(int series)` Returns the number of items in the specified series.
`VectorSeries` `getSeries(int series)` Returns a series from the collection.
`int` `getSeriesCount()` Returns the number of series in the collection.
`java.lang.Comparable` `getSeriesKey(int series)` Returns the key for a series.
`Vector` `getVector(int series, int item)` Returns the vector for an item in a series.
`double` `getVectorXValue(int series, int item)` Returns the x-component of the vector for an item in a series.
`double` `getVectorYValue(int series, int item)` Returns the y-component of the vector for an item in a series.
`java.lang.Number` `getX(int series, int item)` Returns the x-value for an item within a series.
`double` `getXValue(int series, int item)` Returns the x-value for an item within a series.
`java.lang.Number` `getY(int series, int item)` Returns the y-value for an item within a series.
`double` `getYValue(int series, int item)` Returns the y-value for an item within a series.
`int` `indexOf(VectorSeries series)` Returns the index of the specified series, or -1 if that series is not present in the dataset.
`void` `removeAllSeries()` Removes all the series from the collection and sends a `DatasetChangeEvent` to all registered listeners.
`boolean` `removeSeries(VectorSeries series)` Removes the specified series from the collection and sends a `DatasetChangeEvent` to all registered listeners.

Methods inherited from class org.jfree.data.xy.AbstractXYDataset
`getDomainOrder`

Methods inherited from class org.jfree.data.general.AbstractSeriesDataset
`indexOf, seriesChanged`

Methods inherited from class org.jfree.data.general.AbstractDataset
`addChangeListener, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObject`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jfree.data.xy.XYDataset
`getDomainOrder`

Methods inherited from interface org.jfree.data.general.SeriesDataset
`indexOf`

Methods inherited from interface org.jfree.data.general.Dataset
`addChangeListener, getGroup, removeChangeListener, setGroup`

Constructor Detail

### VectorSeriesCollection

    public VectorSeriesCollection()

  Creates a new instance of `VectorSeriesCollection`.

Method Detail

### addSeries

    public void addSeries(VectorSeries series)

  Adds a series to the collection and sends a `DatasetChangeEvent` to all registered listeners.

  Parameters:
    `series` - the series (`null` not permitted).

### removeSeries

    public boolean removeSeries(VectorSeries series)

  Removes the specified series from the collection and sends a `DatasetChangeEvent` to all registered listeners.

  Parameters:
    `series` - the series (`null` not permitted).
  Returns:
    A boolean indicating whether the series has actually been removed.

### removeAllSeries

    public void removeAllSeries()

  Removes all the series from the collection and sends a `DatasetChangeEvent` to all registered listeners.

### getSeriesCount

    public int getSeriesCount()

  Returns the number of series in the collection.

  Specified by:
    `getSeriesCount` in interface `SeriesDataset`
  Specified by:
    `getSeriesCount` in class `AbstractSeriesDataset`
  Returns:
    The series count.

### getSeries

    public VectorSeries getSeries(int series)

  Returns a series from the collection.

  Parameters:
    `series` - the series index (zero-based).
  Returns:
    The series.
  Throws:
    `java.lang.IllegalArgumentException` - if `series` is not in the range `0` to `getSeriesCount() - 1`.

### getSeriesKey

    public java.lang.Comparable getSeriesKey(int series)

  Returns the key for a series.

  Specified by:
    `getSeriesKey` in interface `SeriesDataset`
  Specified by:
    `getSeriesKey` in class `AbstractSeriesDataset`
  Parameters:
    `series` - the series index (in the range `0` to `getSeriesCount() - 1`).
  Returns:
    The key for a series.
  Throws:
    `java.lang.IllegalArgumentException` - if `series` is not in the specified range.

### indexOf

    public int indexOf(VectorSeries series)

  Returns the index of the specified series, or -1 if that series is not present in the dataset.

  Parameters:
    `series` - the series (`null` not permitted).
  Returns:
    The series index.

### getItemCount

    public int getItemCount(int series)

  Returns the number of items in the specified series.

  Specified by:
    `getItemCount` in interface `XYDataset`
  Parameters:
    `series` - the series (zero-based index).
  Returns:
    The item count.
  Throws:
    `java.lang.IllegalArgumentException` - if `series` is not in the range `0` to `getSeriesCount() - 1`.

### getXValue

    public double getXValue(int series,
                            int item)

  Returns the x-value for an item within a series.

  Specified by:
    `getXValue` in interface `XYDataset`
  Overrides:
    `getXValue` in class `AbstractXYDataset`
  Parameters:
    `series` - the series index.
    `item` - the item index.
  Returns:
    The x-value.

### getX

    public java.lang.Number getX(int series,
                                 int item)

  Returns the x-value for an item within a series. Note that this method creates a new `Double` instance every time it is called---use `getXValue(int, int)` instead, if possible.

  Specified by:
    `getX` in interface `XYDataset`
  Parameters:
    `series` - the series index.
    `item` - the item index.
  Returns:
    The x-value.

### getYValue

    public double getYValue(int series,
                            int item)

  Returns the y-value for an item within a series.

  Specified by:
    `getYValue` in interface `XYDataset`
  Overrides:
    `getYValue` in class `AbstractXYDataset`
  Parameters:
    `series` - the series index.
    `item` - the item index.
  Returns:
    The y-value.

### getY

    public java.lang.Number getY(int series,
                                 int item)

  Returns the y-value for an item within a series. Note that this method creates a new `Double` instance every time it is called---use `getYValue(int, int)` instead, if possible.

  Specified by:
    `getY` in interface `XYDataset`
  Parameters:
    `series` - the series index.
    `item` - the item index.
  Returns:
    The y-value.

### getVector

    public Vector getVector(int series,
                            int item)

  Returns the vector for an item in a series.

  Specified by:
    `getVector` in interface `VectorXYDataset`
  Parameters:
    `series` - the series index.
    `item` - the item index.
  Returns:
    The vector (possibly `null`).

### getVectorXValue

    public double getVectorXValue(int series,
                                  int item)

  Returns the x-component of the vector for an item in a series.

  Specified by:
    `getVectorXValue` in interface `VectorXYDataset`
  Parameters:
    `series` - the series index.
    `item` - the item index.
  Returns:
    The x-component of the vector.

### getVectorYValue

    public double getVectorYValue(int series,
                                  int item)

  Returns the y-component of the vector for an item in a series.

  Specified by:
    `getVectorYValue` in interface `VectorXYDataset`
  Parameters:
    `series` - the series index.
    `item` - the item index.
  Returns:
    The y-component of the vector.

### equals

    public boolean equals(java.lang.Object obj)

  Tests this instance for equality with an arbitrary object.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the object (`null` permitted).
  Returns:
    A boolean.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Returns a clone of this instance.

  Specified by:
    `clone` in interface `org.jfree.util.PublicCloneable`
  Overrides:
    `clone` in class `AbstractDataset`
  Returns:
    A clone.
  Throws:
    `java.lang.CloneNotSupportedException` - if there is a problem.