Package io.deephaven.plot.datasets.data
Class AssociativeDataSwappableTable<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.AssociativeDataSwappableTable<KEY,VALUE,VALUECOLUMN>
- All Implemented Interfaces:
PlotExceptionCause,Serializable
public class AssociativeDataSwappableTable<KEY,VALUE,VALUECOLUMN>
extends LiveAssociativeData<KEY,VALUE,VALUECOLUMN>
An
AssociativeData dataset backed by a SwappableTable. Table columns hold the keys and associated
values.
Data types are specified in construction.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAssociativeDataSwappableTable(SwappableTable swappableTable, String keyColumn, String valueColumn, Class<KEY> keyColumnType, Class<VALUECOLUMN> valueColumnType, PlotInfo plotInfo) Creates an AssociativeDataSwappableTable instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the value associated with the keybooleanWhether the dataset is modifiable.voidAdds the key-value pair to the dataset.Adds all key-value pairs in the map to the dataset.Methods inherited from class io.deephaven.plot.datasets.data.LiveAssociativeData
convertMethods inherited from class io.deephaven.plot.datasets.data.AssociativeData
getPlotInfo
-
Constructor Details
-
AssociativeDataSwappableTable
public AssociativeDataSwappableTable(SwappableTable swappableTable, String keyColumn, String valueColumn, Class<KEY> keyColumnType, Class<VALUECOLUMN> valueColumnType, PlotInfo plotInfo) Creates an AssociativeDataSwappableTable instance. TheswappableTablemust have had a lastBy applied! Indices are held in thekeyColumnofswappableTable. Their associated values are held in thevalueColumn. The data type of the keys is specified bykeyColumnType. The data type of the values is specified byvalueColumnType.- Parameters:
swappableTable- table. Must have a lastBy applied.keyColumn- column inswappableTablewhich holds the key valuesvalueColumn- column inswappableTablewhich holds the values associated with the keyskeyColumnType- data type of the keysvalueColumnType- data type of the valuesplotInfo- plot information- Throws:
RequirementFailure-swappableTable,keyColumn, andvalueColumnmust not be nullIllegalArgumentException-keyColumnandvalueColumnmust be columns inswappableTableRuntimeException- the specified data types must match the data types of the corresponding columns
-
-
Method Details
-
get
Description copied from class:AssociativeDataGets the value associated with the key- Specified by:
getin classAssociativeData<KEY,VALUE> - Parameters:
key- key- Returns:
- value associated with the key
-
isModifiable
public boolean isModifiable()Description copied from class:AssociativeDataWhether the dataset is modifiable.- Specified by:
isModifiablein classAssociativeData<KEY,VALUE> - Returns:
- true if the dataset is modifiable, false if not
-
put
Description copied from class:AssociativeDataAdds the key-value pair to the dataset.- Specified by:
putin classAssociativeData<KEY,VALUE> - Parameters:
key- keyvalue- value
-
putAll
Description copied from class:AssociativeDataAdds all key-value pairs in the map to the dataset.- Specified by:
putAllin classAssociativeData<KEY,VALUE> - Type Parameters:
K- type of the keys invaluesV- type of the values invalues- Parameters:
values- keypair map
-