Package io.deephaven.plot.datasets.data
Class AssociativeDataWithDefault<KEY,VALUE>
java.lang.Object
io.deephaven.plot.datasets.data.AssociativeData<KEY,VALUE>
io.deephaven.plot.datasets.data.AssociativeDataWithDefault<KEY,VALUE>
- All Implemented Interfaces:
PlotExceptionCause,Serializable
Dataset which has values associated with keys. When the dataset has no value associated with a given key, it falls
back to a specified default value.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value associated with the keyGets the default value for this dataset.Gets this dataset's key-value pairs as anAssociativeDatadataset.booleanWhether the dataset is modifiable.voidAdds the key-value pair to the dataset.Adds all key-value pairs in the map to the dataset.voidset(AssociativeDataWithDefault<KEY, VALUE> data) Sets this dataset's values equal to the values in another dataset.voidsetDefault(VALUE value) Defines the default value for this dataset.voidsetSpecific(AssociativeData<KEY, VALUE> provider) Sets this dataset's key-value pairs.Methods inherited from class io.deephaven.plot.datasets.data.AssociativeData
getPlotInfo
-
Constructor Details
-
AssociativeDataWithDefault
- Parameters:
plotInfo- plot information
-
-
Method Details
-
getDefault
Gets the default value for this dataset.- Returns:
- default value for this dataset
-
setDefault
Defines the default value for this dataset.- Parameters:
value- default value
-
getSpecific
Gets this dataset's key-value pairs as anAssociativeDatadataset.- Returns:
AssociativeDatadataset representing this datasets key-value pairs
-
setSpecific
Sets this dataset's key-value pairs.- Parameters:
provider- dataset holding key-value pairs
-
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
-
set
Sets this dataset's values equal to the values in another dataset.- Parameters:
data- dataset to get values from.
-