Class AssociativeDataTable<KEY,VALUE,VALUECOLUMN>
java.lang.Object
com.illumon.iris.db.plot.datasets.data.AssociativeData<KEY,VALUE>
com.illumon.iris.db.plot.datasets.data.LiveAssociativeData<KEY,VALUE,VALUECOLUMN>
com.illumon.iris.db.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:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description AssociativeDataTable(DataChangeListener dataChangeListener, TableHandle tableHandle, String keyColumn, String valueColumn, Class<KEY> keyColumnType, Class<VALUECOLUMN> valueColumnType, PlotInfo plotInfo)Creates an AssociativeDataSwappableTable instance. -
Method Summary
Modifier and Type Method Description VALUEget(KEY key)Gets the value associated with the keybooleanisModifiable()Whether the dataset is modifiable.voidonClose()Tear down once a figure is removed.voidput(KEY key, VALUE value)Adds the key-value pair to the dataset.<K extends KEY, V extends VALUE>
voidputAll(Map<K,V> values)Adds all key-value pairs in the map to the dataset.AssociativeData<KEY,VALUE>snapshot()Methods inherited from class com.illumon.iris.db.plot.datasets.data.LiveAssociativeData
constructSnapshot, convert
-
Constructor Details
-
AssociativeDataTable
public AssociativeDataTable(DataChangeListener dataChangeListener, TableHandle tableHandle, String keyColumn, String valueColumn, Class<KEY> keyColumnType, Class<VALUECOLUMN> valueColumnType, PlotInfo plotInfo)Creates an AssociativeDataSwappableTable instance. Key are in thekeyColumnof the table held bytableHandle. Their associated values are in thevalueColumn. The data type of the keys is specified bykeyColumnType. The data type of the values is specified byvalueColumnType.- Parameters:
dataChangeListener- listener for data changes in this seriestableHandle- holds the underlying tablekeyColumn- column in the table which holds the key valuesvalueColumn- column in the table which holds the values associated with the keyskeyColumnType- data type of the keysvalueColumnType- data type of the valuesplotInfo- plot information- Throws:
com.fishlib.base.verify.RequirementFailure-tableHandle,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
-
onClose
public void onClose()Description copied from class:AssociativeDataTear down once a figure is removed.- Overrides:
onClosein classAssociativeData<KEY,VALUE>
-
snapshot
- Specified by:
snapshotin classLiveAssociativeData<KEY,VALUE,VALUECOLUMN>
-