Class SimpleIntervalXYDataset

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

public class SimpleIntervalXYDataset
extends AbstractIntervalXYDataset
implements IntervalXYDataset
A quick and dirty sample dataset.
See Also:
Serialized Form
  • Constructor Details

    • SimpleIntervalXYDataset

      public SimpleIntervalXYDataset()
      Creates a new dataset.
  • Method Details

    • 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 number of series in the dataset.
    • 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 series name.
    • 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 a 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 for an item within a series.
    • 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 for an item within a series.
    • getStartXValue

      public Number getStartXValue​(int series, int item)
      Returns the starting X value for the specified series and item.
      Specified by:
      getStartXValue in interface IntervalXYDataset
      Parameters:
      series - the series (zero-based index).
      item - the item within a series (zero-based index).
      Returns:
      the start x value.
    • getEndXValue

      public Number getEndXValue​(int series, int item)
      Returns the ending X value for the specified series and item.
      Specified by:
      getEndXValue in interface IntervalXYDataset
      Parameters:
      series - the series (zero-based index).
      item - the item within a series (zero-based index).
      Returns:
      the end x value.
    • getStartYValue

      public Number getStartYValue​(int series, int item)
      Returns the starting Y value for the specified series and item.
      Specified by:
      getStartYValue in interface IntervalXYDataset
      Parameters:
      series - the series (zero-based index).
      item - the item within a series (zero-based index).
      Returns:
      the start y value.
    • getEndYValue

      public Number getEndYValue​(int series, int item)
      Returns the ending Y value for the specified series and item.
      Specified by:
      getEndYValue in interface IntervalXYDataset
      Parameters:
      series - the series (zero-based index).
      item - the item within a series (zero-based index).
      Returns:
      the end y value.
    • addChangeListener

      public void addChangeListener​(DatasetChangeListener listener)
      Registers an object for 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 for notification of changes to the dataset.
      Specified by:
      removeChangeListener in interface Dataset
      Overrides:
      removeChangeListener in class AbstractDataset
      Parameters:
      listener - the object to deregister.