Class IndexableDataWithDefault<T>
java.lang.Object
com.illumon.iris.db.plot.datasets.data.IndexableData<T>
com.illumon.iris.db.plot.datasets.data.IndexableDataWithDefault<T>
- All Implemented Interfaces:
PlotExceptionCause,Serializable
IndexableData with a default value for missing indices and nulls.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int index) Gets the value at the given index.Gets the default value for this dataset.voidonClose()Tear down once a figure is removed.voidset(IndexableDataWithDefault<T> data) Sets this datasets values equal to the values in another dataset.voidsetDefault(T v) Defines the default value for this dataset.<TT extends T>
voidsetSpecific(IndexableData<TT> specificValues, boolean infinite) Sets this datasets indexed values.intsize()Gets the size of this dataset.Methods inherited from class com.illumon.iris.db.plot.datasets.data.IndexableData
getPlotInfo, snapshot
-
Constructor Details
-
IndexableDataWithDefault
- Parameters:
plotInfo- plot information
-
-
Method Details
-
size
public int size()Description copied from class:IndexableDataGets the size of this dataset.- Specified by:
sizein classIndexableData<T>- Returns:
- the size of this dataset
-
get
Description copied from class:IndexableDataGets the value at the given index.- Specified by:
getin 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.
-
onClose
public void onClose()Description copied from class:IndexableDataTear down once a figure is removed.- Overrides:
onClosein classIndexableData<T>
-