Class AssociativeData<KEY,VALUE>
java.lang.Object
com.illumon.iris.db.plot.datasets.data.AssociativeData<KEY,VALUE>
- All Implemented Interfaces:
PlotExceptionCause
,Serializable
- Direct Known Subclasses:
AssociativeDataHashMap
,AssociativeDataWithDefault
,LiveAssociativeData
public abstract class AssociativeData<KEY,VALUE> extends Object implements PlotExceptionCause, Serializable
Dataset which has values associated with keys.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description AssociativeData(PlotInfo plotInfo)
-
Method Summary
Modifier and Type Method Description abstract VALUE
get(KEY key)
Gets the value associated with the keyPlotInfo
getPlotInfo()
abstract boolean
isModifiable()
Whether the dataset is modifiable.void
onClose()
Tear down once a figure is removed.abstract void
put(KEY key, VALUE value)
Adds the key-value pair to the dataset.abstract <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()
-
Constructor Details
-
AssociativeData
- Parameters:
plotInfo
- plot information
-
-
Method Details
-
get
Gets the value associated with the key- Parameters:
key
- key- Returns:
- value associated with the key
-
isModifiable
public abstract boolean isModifiable()Whether the dataset is modifiable.- Returns:
- true if the dataset is modifiable, false if not
-
put
Adds the key-value pair to the dataset.- Parameters:
key
- keyvalue
- value
-
putAll
Adds all key-value pairs in the map to the dataset.- Type Parameters:
K
- type of the keys invalues
V
- type of the values invalues
- Parameters:
values
- keypair map
-
onClose
public void onClose()Tear down once a figure is removed. -
snapshot
-
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-