Module platform

Class HistogramAdapter

java.lang.Object
de.grogra.pf.data.DatasetAdapterBase
de.grogra.pf.data.HistogramAdapter
All Implemented Interfaces:
Dataset, SeriesDataset, IntervalXYDataset, XYDataset

public final class HistogramAdapter extends DatasetAdapterBase implements IntervalXYDataset
  • Constructor Details

    • HistogramAdapter

      public HistogramAdapter(Dataset ds)
  • Method Details

    • getXValue

      public double getXValue(int series, int item)
      Description copied from interface: XYDataset
      Returns the x-value for an item within a series.
      Specified by:
      getXValue in interface XYDataset
      Parameters:
      series - the series index (in the range 0 to getSeriesCount() - 1).
      item - the item index (in the range 0 to getItemCount(series)).
      Returns:
      The x-value.
    • getStartXValue

      public double getStartXValue(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the lower bound of the x-interval (as a double primitive) for the specified series and item.
      Specified by:
      getStartXValue in interface IntervalXYDataset
      Parameters:
      series - the series (zero-based index).
      item - the item (zero-based index).
      Returns:
      The lower bound of the x-interval.
      See Also:
    • getEndXValue

      public double getEndXValue(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the upper bound of the x-interval (as a double primitive) for the specified series and item.
      Specified by:
      getEndXValue in interface IntervalXYDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The upper bound of the x-interval.
      See Also:
    • getYValue

      public double getYValue(int series, int item)
      Description copied from interface: XYDataset
      Returns the y-value (as a double primitive) for an item within a series.
      Specified by:
      getYValue in interface XYDataset
      Parameters:
      series - the series index (in the range 0 to getSeriesCount() - 1).
      item - the item index (in the range 0 to getItemCount(series)).
      Returns:
      The y-value.
    • getItemCount

      public int getItemCount(int series)
      Description copied from interface: XYDataset
      Returns the number of items in a series.

      It is recommended that classes that implement this method should throw an IllegalArgumentException if the series argument is outside the specified range.
      Specified by:
      getItemCount in interface XYDataset
      Parameters:
      series - the series index (in the range 0 to getSeriesCount() - 1).
      Returns:
      The item count.
    • getEndX

      public Number getEndX(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the upper bound of the x-interval for the specified series and item. If this upper bound is specified, it should be greater than or equal to the lower bound of the interval (if one is specified).
      Specified by:
      getEndX in interface IntervalXYDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The upper bound of the x-interval (null permitted).
    • getEndY

      public Number getEndY(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the upper bound of the y-interval for the specified series and item. If this upper bound is specified, it should be greater than or equal to the lower bound of the interval (if one is specified).
      Specified by:
      getEndY in interface IntervalXYDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The upper bound of the y-interval (null permitted).
    • getEndYValue

      public double getEndYValue(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the upper bound of the y-interval (as a double primitive) for the specified series and item.
      Specified by:
      getEndYValue in interface IntervalXYDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The upper bound of the y-interval.
      See Also:
    • getStartX

      public Number getStartX(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the lower bound of the x-interval for the specified series and item. If this lower bound is specified, it should be less than or equal to the upper bound of the interval (if one is specified).
      Specified by:
      getStartX in interface IntervalXYDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The lower bound of the x-interval (null permitted).
    • getStartY

      public Number getStartY(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the lower bound of the y-interval for the specified series and item. If this lower bound is specified, it should be less than or equal to the upper bound of the interval (if one is specified).
      Specified by:
      getStartY in interface IntervalXYDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The lower bound of the y-interval (null permitted).
    • getStartYValue

      public double getStartYValue(int series, int item)
      Description copied from interface: IntervalXYDataset
      Returns the lower bound of the y-interval (as a double primitive) for the specified series and item.
      Specified by:
      getStartYValue in interface IntervalXYDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The lower bound of the y-interval.
      See Also:
    • getX

      public Number getX(int series, int item)
      Description copied from interface: XYDataset
      Returns the x-value for an item within a series. The x-values may or may not be returned in ascending order, that is up to the class implementing the interface.
      Specified by:
      getX in interface XYDataset
      Parameters:
      series - the series index (in the range 0 to getSeriesCount() - 1).
      item - the item index (in the range 0 to getItemCount(series)).
      Returns:
      The x-value (never null).
    • getY

      public Number getY(int series, int item)
      Description copied from interface: XYDataset
      Returns the y-value for an item within a series.
      Specified by:
      getY in interface XYDataset
      Parameters:
      series - the series index (in the range 0 to getSeriesCount() - 1).
      item - the item index (in the range 0 to getItemCount(series)).
      Returns:
      The y-value (possibly null).