Class IndexableDataSwappableTable<T>
java.lang.Object
com.illumon.iris.db.plot.datasets.data.IndexableData<T>
com.illumon.iris.db.plot.datasets.data.LiveIndexableData<T>
com.illumon.iris.db.plot.datasets.data.IndexableDataSwappableTable<T>
- All Implemented Interfaces:
PlotExceptionCause
,SwappableTable.LocalTableUpdateListener
,Serializable
- Direct Known Subclasses:
IndexableDataSwappableTableDouble
public class IndexableDataSwappableTable<T>
extends LiveIndexableData<T>
implements SwappableTable.LocalTableUpdateListener
IndexableData
dataset whose data is a column in a SwappableTable
and whose indices are the row numbers of the column.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIndexableDataSwappableTable
(SwappableTable swappableTable, String column, PlotInfo plotInfo) Creates an IndexableDataSwappableTable instance. -
Method Summary
Modifier and TypeMethodDescriptionConverts between the value in the column and the return value of the provider.get
(int index) Gets the value at the given index.void
onClose()
Tear down once a figure is removed.void
onLocalTableUpdate
(Table localTable) Updates this listener with the new table.int
size()
Gets the size of this dataset.snapshot()
Methods inherited from class com.illumon.iris.db.plot.datasets.data.IndexableData
getPlotInfo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.plot.util.tables.SwappableTable.LocalTableUpdateListener
onInitialSnapshot
-
Constructor Details
-
IndexableDataSwappableTable
Creates an IndexableDataSwappableTable instance. The data is acolumn
in theswappableTable
. Indices are the row numbers of the column.- Parameters:
swappableTable
- swappable tablecolumn
- column ofswappableTable
holding the data valuesplotInfo
- plot information- Throws:
com.fishlib.base.verify.RequirementFailure
-swappableTable
andcolumn
must not be nullIllegalArgumentException
-column
must be a column inswappableTable
-
-
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
-
convert
Converts between the value in the column and the return value of the provider.- Parameters:
v
- value in the column- Returns:
- value in the column converted to return type of the provider
-
onLocalTableUpdate
Description copied from interface:SwappableTable.LocalTableUpdateListener
Updates this listener with the new table.- Specified by:
onLocalTableUpdate
in interfaceSwappableTable.LocalTableUpdateListener
- Parameters:
localTable
- table
-
onClose
public void onClose()Description copied from class:IndexableData
Tear down once a figure is removed.- Overrides:
onClose
in classIndexableData<T>
-
snapshot
- Specified by:
snapshot
in classLiveIndexableData<T>
-