Class AssociativeDataTable<KEY,VALUE,VALUECOLUMN>

java.lang.Object
io.deephaven.plot.datasets.data.AssociativeData<KEY,VALUE>
io.deephaven.plot.datasets.data.LiveAssociativeData<KEY,VALUE,VALUECOLUMN>
io.deephaven.plot.datasets.data.AssociativeDataTable<KEY,VALUE,VALUECOLUMN>
All Implemented Interfaces:
PlotExceptionCause, Serializable

public class AssociativeDataTable<KEY,VALUE,VALUECOLUMN> extends LiveAssociativeData<KEY,VALUE,VALUECOLUMN>
An AssociativeData dataset backed by a Table. Table columns hold the keys and the associated values. Data types are specified in construction.
See Also:
  • Constructor Details

    • AssociativeDataTable

      public AssociativeDataTable(TableHandle tableHandle, String keyColumn, String valueColumn, Class<KEY> keyColumnType, Class<VALUECOLUMN> valueColumnType, PlotInfo plotInfo)
      Creates an AssociativeDataSwappableTable instance. Key are in the keyColumn of the table held by tableHandle. Their associated values are in the valueColumn. The data type of the keys is specified by keyColumnType. The data type of the values is specified by valueColumnType.
      Parameters:
      tableHandle - holds the underlying table
      keyColumn - column in the table which holds the key values
      valueColumn - column in the table which holds the values associated with the keys
      keyColumnType - data type of the keys
      valueColumnType - data type of the values
      plotInfo - plot information
      Throws:
      RequirementFailure - tableHandle, keyColumn, and valueColumn must not be null
      IllegalArgumentException - keyColumn and valueColumn must be columns in swappableTable
      RuntimeException - the specified data types must match the data types of the corresponding columns
  • Method Details

    • get

      public VALUE get(KEY key)
      Description copied from class: AssociativeData
      Gets the value associated with the key
      Specified by:
      get in class AssociativeData<KEY,VALUE>
      Parameters:
      key - key
      Returns:
      value associated with the key
    • isModifiable

      public boolean isModifiable()
      Description copied from class: AssociativeData
      Whether the dataset is modifiable.
      Specified by:
      isModifiable in class AssociativeData<KEY,VALUE>
      Returns:
      true if the dataset is modifiable, false if not
    • put

      public void put(KEY key, VALUE value)
      Description copied from class: AssociativeData
      Adds the key-value pair to the dataset.
      Specified by:
      put in class AssociativeData<KEY,VALUE>
      Parameters:
      key - key
      value - value
    • putAll

      public <K extends KEY, V extends VALUE> void putAll(Map<K,V> values)
      Description copied from class: AssociativeData
      Adds all key-value pairs in the map to the dataset.
      Specified by:
      putAll in class AssociativeData<KEY,VALUE>
      Type Parameters:
      K - type of the keys in values
      V - type of the values in values
      Parameters:
      values - keypair map