Module platform

Class AbstractSeriesDataset

java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
All Implemented Interfaces:
ObjectInputValidation, Serializable, Cloneable, EventListener, Dataset, SeriesChangeListener, SeriesDataset
Direct Known Subclasses:
AbstractXYDataset, DefaultIntervalCategoryDataset, TaskSeriesCollection

public abstract class AbstractSeriesDataset extends AbstractDataset implements SeriesDataset, SeriesChangeListener, Serializable
An abstract implementation of the SeriesDataset interface, containing a mechanism for registering change listeners.
See Also:
  • Constructor Details

    • AbstractSeriesDataset

      protected AbstractSeriesDataset()
      Creates a new dataset.
  • Method Details

    • getSeriesCount

      public abstract int getSeriesCount()
      Returns the number of series in the dataset.
      Specified by:
      getSeriesCount in interface SeriesDataset
      Returns:
      The series count.
    • getSeriesKey

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

      If series is not within the specified range, the implementing method should throw an IndexOutOfBoundsException (preferred) or an IllegalArgumentException.

      Specified by:
      getSeriesKey in interface SeriesDataset
      Parameters:
      series - the series index (in the range 0 to getSeriesCount() - 1).
      Returns:
      The series key.
    • indexOf

      public int indexOf(Comparable seriesKey)
      Returns the index of the named series, or -1.
      Specified by:
      indexOf in interface SeriesDataset
      Parameters:
      seriesKey - the series key (null permitted).
      Returns:
      The index.
    • seriesChanged

      public void seriesChanged(SeriesChangeEvent event)
      Called when a series belonging to the dataset changes.
      Specified by:
      seriesChanged in interface SeriesChangeListener
      Parameters:
      event - information about the change.