Class SampleXYZDataset

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

public class SampleXYZDataset
extends AbstractXYZDataset
implements XYZDataset
A quick-and-dirty implementation of the interface. Hard-coded and not useful beyond the demo.
See Also:
Serialized Form
  • Constructor Details

    • SampleXYZDataset

      public SampleXYZDataset()
  • 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 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.
    • 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.
    • 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.
    • getZValue

      public Number getZValue​(int series, int item)
      Returns the z-value for the specified series and item.
      Specified by:
      getZValue in interface XYZDataset
      Parameters:
      series - the series (zero-based index).
      item - the item (zero-based index).
      Returns:
      the z-value for the specified series and item.