Class SampleSignalDataset

All Implemented Interfaces:
ObjectInputValidation, Serializable, Cloneable, EventListener, Dataset, SeriesChangeListener, SeriesDataset, SignalsDataset, XYDataset

public class SampleSignalDataset
extends AbstractXYDataset
implements SignalsDataset
A sample signal dataset.
See Also:
Serialized Form
  • Constructor Details

    • SampleSignalDataset

      public SampleSignalDataset()
      Default constructor.
  • Method Details

    • getItemCount

      public int getItemCount​(int series)
      Returns the number of items in a series.
      Specified by:
      getItemCount in interface XYDataset
      Parameters:
      series - the series (zero-based index).
      Returns:
      the number of items within the series.
    • getSeriesCount

      public int getSeriesCount()
      Returns the number of series in the dataset.
      Specified by:
      getSeriesCount in interface SeriesDataset
      Specified by:
      getSeriesCount in class AbstractSeriesDataset
      Returns:
      the series count.
    • getSeriesName

      public String getSeriesName​(int series)
      Returns the name of a series.
      Specified by:
      getSeriesName in interface SeriesDataset
      Specified by:
      getSeriesName in class AbstractSeriesDataset
      Parameters:
      series - the series (zero-based index).
      Returns:
      the name of the series.
    • getXValue

      public Number getXValue​(int series, int item)
      Returns the x-value for an item within a series.

      The implementation is responsible for ensuring that the x-values are presented in ascending order.

      Specified by:
      getXValue in interface XYDataset
      Parameters:
      series - the series (zero-based index).
      item - the item (zero-based index).
      Returns:
      the x-value.
    • getYValue

      public Number getYValue​(int series, int item)
      Returns the y-value for an item within a series.
      Specified by:
      getYValue in interface XYDataset
      Parameters:
      series - the series (zero-based index).
      item - the item (zero-based index).
      Returns:
      the y-value.
    • getType

      public int getType​(int series, int item)
      Returns the type.
      Specified by:
      getType in interface SignalsDataset
      Parameters:
      series - the series (zero-based index).
      item - the item (zero-based index).
      Returns:
      the type.
    • getLevel

      public double getLevel​(int series, int item)
      Returns the level.
      Specified by:
      getLevel in interface SignalsDataset
      Parameters:
      series - the series (zero-based index).
      item - the item (zero-based index).
      Returns:
      the level.
    • addChangeListener

      public void addChangeListener​(DatasetChangeListener listener)
      Registers an object to receive notification of changes to the dataset.
      Specified by:
      addChangeListener in interface Dataset
      Overrides:
      addChangeListener in class AbstractDataset
      Parameters:
      listener - the object to register.
    • removeChangeListener

      public void removeChangeListener​(DatasetChangeListener listener)
      Deregisters an object so that it no longer receives notification of changes to the dataset.
      Specified by:
      removeChangeListener in interface Dataset
      Overrides:
      removeChangeListener in class AbstractDataset
      Parameters:
      listener - the object to deregister.