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.voidonClose()Tear down once a figure is removed.voidonLocalTableUpdate(Table localTable) Updates this listener with the new table.intsize()Gets the size of this dataset.snapshot()Methods inherited from class com.illumon.iris.db.plot.datasets.data.IndexableData
getPlotInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.plot.util.tables.SwappableTable.LocalTableUpdateListener
onInitialSnapshot
-
Constructor Details
-
IndexableDataSwappableTable
Creates an IndexableDataSwappableTable instance. The data is acolumnin theswappableTable. Indices are the row numbers of the column.- Parameters:
swappableTable- swappable tablecolumn- column ofswappableTableholding the data valuesplotInfo- plot information- Throws:
com.fishlib.base.verify.RequirementFailure-swappableTableandcolumnmust not be nullIllegalArgumentException-columnmust be a column inswappableTable
-
-
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
-
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.LocalTableUpdateListenerUpdates this listener with the new table.- Specified by:
onLocalTableUpdatein interfaceSwappableTable.LocalTableUpdateListener- Parameters:
localTable- table
-
onClose
public void onClose()Description copied from class:IndexableDataTear down once a figure is removed.- Overrides:
onClosein classIndexableData<T>
-
snapshot
- Specified by:
snapshotin classLiveIndexableData<T>
-