Package io.deephaven.plot.datasets.data
Class IndexableDataWithDefault<T>
java.lang.Object
io.deephaven.plot.datasets.data.IndexableData<T>
io.deephaven.plot.datasets.data.IndexableDataWithDefault<T>
- All Implemented Interfaces:
PlotExceptionCause
,Serializable
IndexableData
with a default value for missing indices and nulls.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget
(int index) Gets the value at the given index.Gets the default value for this dataset.void
set
(IndexableDataWithDefault<T> data) Sets this datasets values equal to the values in another dataset.void
setDefault
(T v) Defines the default value for this dataset.<TT extends T>
voidsetSpecific
(IndexableData<TT> specificValues, boolean infinite) Sets this datasets indexed values.int
size()
Gets the size of this dataset.Methods inherited from class io.deephaven.plot.datasets.data.IndexableData
getPlotInfo
-
Constructor Details
-
IndexableDataWithDefault
- Parameters:
plotInfo
- plot information
-
-
Method Details
-
size
public int size()Description copied from class:IndexableData
Gets the size of this dataset.- Specified by:
size
in classIndexableData<T>
- Returns:
- the size of this dataset
-
get
Description copied from class:IndexableData
Gets the value at the given index.- Specified by:
get
in classIndexableData<T>
- Parameters:
index
- index- Returns:
- value of this dataset at
index
-
setDefault
Defines the default value for this dataset.- Parameters:
v
- value
-
getDefaultValue
Gets the default value for this dataset.- Returns:
- default value for this dataset
-
setSpecific
Sets this datasets indexed values. If infinite is true, null values are returned for out-of-bounds indices. If not, an exception will be thrown.- Type Parameters:
TT
- type of the data inspecificValues
- Parameters:
specificValues
- datainfinite
- if this dataset should return nulls for out-of-bounds indices.
-
set
Sets this datasets values equal to the values in another dataset.- Parameters:
data
- dataset to get values from.
-