Module platform

Class DatasetAdapter

java.lang.Object
de.grogra.pf.data.DatasetAdapterBase
de.grogra.pf.data.DatasetAdapter
All Implemented Interfaces:
CategoryDataset, Dataset, KeyedValueDataset, PieDataset, SeriesDataset, ValueDataset, KeyedValue, KeyedValues, KeyedValues2D, StatisticalCategoryDataset, Value, Values, Values2D, TableXYDataset, XYDataset, XYZDataset

  • Method Details

    • 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.
    • 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).
    • getZ

      public Number getZ(int series, int item)
      Description copied from interface: XYZDataset
      Returns the z-value for the specified series and item.
      Specified by:
      getZ in interface XYZDataset
      Parameters:
      series - the series index (zero-based).
      item - the item index (zero-based).
      Returns:
      The z-value (possibly null).
    • getValue

      public Number getValue()
      Description copied from interface: Value
      Returns the value.
      Specified by:
      getValue in interface Value
      Returns:
      The value (possibly null).
    • getKey

      public Comparable getKey()
      Description copied from interface: KeyedValue
      Returns the key associated with the value. The key returned by this method should be immutable.
      Specified by:
      getKey in interface KeyedValue
      Returns:
      The key (never null).
    • getRowKey

      public Comparable getRowKey(int row)
      Description copied from interface: KeyedValues2D
      Returns the row key for a given index.
      Specified by:
      getRowKey in interface KeyedValues2D
      Parameters:
      row - the row index (zero-based).
      Returns:
      The row key.
    • getRowIndex

      public int getRowIndex(Comparable key)
      Description copied from interface: KeyedValues2D
      Returns the row index for a given key.
      Specified by:
      getRowIndex in interface KeyedValues2D
      Parameters:
      key - the row key.
      Returns:
      The row index, or -1 if the key is unrecognised.
    • getRowKeys

      public List getRowKeys()
      Description copied from interface: KeyedValues2D
      Returns the row keys.
      Specified by:
      getRowKeys in interface KeyedValues2D
      Returns:
      The keys.
    • getRowCount

      public int getRowCount()
      Description copied from interface: Values2D
      Returns the number of rows in the table.
      Specified by:
      getRowCount in interface Values2D
      Returns:
      The row count.
    • getColumnKey

      public Comparable getColumnKey(int column)
      Description copied from interface: KeyedValues2D
      Returns the column key for a given index.
      Specified by:
      getColumnKey in interface KeyedValues2D
      Parameters:
      column - the column index (zero-based).
      Returns:
      The column key.
    • getColumnIndex

      public int getColumnIndex(Comparable key)
      Description copied from interface: KeyedValues2D
      Returns the column index for a given key.
      Specified by:
      getColumnIndex in interface KeyedValues2D
      Parameters:
      key - the column key.
      Returns:
      The column index, or -1 if the key is unrecognised.
    • getColumnKeys

      public List getColumnKeys()
      Description copied from interface: KeyedValues2D
      Returns the column keys.
      Specified by:
      getColumnKeys in interface KeyedValues2D
      Returns:
      The keys.
    • getColumnCount

      public int getColumnCount()
      Description copied from interface: Values2D
      Returns the number of columns in the table.
      Specified by:
      getColumnCount in interface Values2D
      Returns:
      The column count.
    • getValue

      public Number getValue(Comparable rowKey, Comparable columnKey)
      Description copied from interface: KeyedValues2D
      Returns the value associated with the specified keys.
      Specified by:
      getValue in interface KeyedValues2D
      Parameters:
      rowKey - the row key (null not permitted).
      columnKey - the column key (null not permitted).
      Returns:
      The value.
    • getValue

      public Number getValue(int row, int column)
      Description copied from interface: Values2D
      Returns a value from the table.
      Specified by:
      getValue in interface Values2D
      Parameters:
      row - the row index (zero-based).
      column - the column index (zero-based).
      Returns:
      The value (possibly null).
    • getKey

      public Comparable getKey(int index)
      Description copied from interface: KeyedValues
      Returns the key associated with the item at a given position. Note that some implementations allow re-ordering of the data items, so the result may be transient.
      Specified by:
      getKey in interface KeyedValues
      Parameters:
      index - the item index (in the range 0 to getItemCount() - 1).
      Returns:
      The key (never null).
    • getIndex

      public int getIndex(Comparable key)
      Description copied from interface: KeyedValues
      Returns the index for a given key.
      Specified by:
      getIndex in interface KeyedValues
      Parameters:
      key - the key (null not permitted).
      Returns:
      The index, or -1 if the key is unrecognised.
    • getKeys

      public List getKeys()
      Description copied from interface: KeyedValues
      Returns the keys for the values in the collection. Note that you can access the values in this collection by key or by index. For this reason, the key order is important - this method should return the keys in order. The returned list may be unmodifiable.
      Specified by:
      getKeys in interface KeyedValues
      Returns:
      The keys (never null).
    • getValue

      public Number getValue(Comparable key)
      Description copied from interface: KeyedValues
      Returns the value for a given key.
      Specified by:
      getValue in interface KeyedValues
      Parameters:
      key - the key.
      Returns:
      The value (possibly null).
    • getItemCount

      public int getItemCount()
      Description copied from interface: Values
      Returns the number of items (values) in the collection.
      Specified by:
      getItemCount in interface TableXYDataset
      Specified by:
      getItemCount in interface Values
      Returns:
      The item count (possibly zero).
    • getValue

      public Number getValue(int item)
      Description copied from interface: Values
      Returns the value with the specified index.
      Specified by:
      getValue in interface Values
      Parameters:
      item - the item index (in the range 0 to getItemCount() -1).
      Returns:
      The value (possibly null).
    • 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.
    • 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.
    • getZValue

      public double getZValue(int series, int item)
      Description copied from interface: XYZDataset
      Returns the z-value (as a double primitive) for an item within a series.
      Specified by:
      getZValue in interface XYZDataset
      Parameters:
      series - the series (zero-based index).
      item - the item (zero-based index).
      Returns:
      The z-value.
    • getMeanValue

      public Number getMeanValue(int row, int column)
      Description copied from interface: StatisticalCategoryDataset
      Returns the mean value for an item.
      Specified by:
      getMeanValue in interface StatisticalCategoryDataset
      Parameters:
      row - the row index (zero-based).
      column - the column index (zero-based).
      Returns:
      The mean value (possibly null).
    • getMeanValue

      public Number getMeanValue(Comparable rowKey, Comparable columnKey)
      Description copied from interface: StatisticalCategoryDataset
      Returns the mean value for an item.
      Specified by:
      getMeanValue in interface StatisticalCategoryDataset
      Parameters:
      rowKey - the row key.
      columnKey - the columnKey.
      Returns:
      The mean value (possibly null).
    • getStdDevValue

      public Number getStdDevValue(int row, int column)
      Description copied from interface: StatisticalCategoryDataset
      Returns the standard deviation value for an item.
      Specified by:
      getStdDevValue in interface StatisticalCategoryDataset
      Parameters:
      row - the row index (zero-based).
      column - the column index (zero-based).
      Returns:
      The standard deviation (possibly null).
    • getStdDevValue

      public Number getStdDevValue(Comparable rowKey, Comparable columnKey)
      Description copied from interface: StatisticalCategoryDataset
      Returns the standard deviation value for an item.
      Specified by:
      getStdDevValue in interface StatisticalCategoryDataset
      Parameters:
      rowKey - the row key.
      columnKey - the columnKey.
      Returns:
      The standard deviation (possibly null).