Class IndexableNumericDataSwappableTable
java.lang.Object
com.illumon.iris.db.plot.datasets.data.IndexableNumericData
com.illumon.iris.db.plot.datasets.data.LiveIndexableNumericData
com.illumon.iris.db.plot.datasets.data.IndexableNumericDataSwappableTable
- All Implemented Interfaces:
PlotExceptionCause,SwappableTable.LocalTableUpdateListener,Serializable
public class IndexableNumericDataSwappableTable
extends LiveIndexableNumericData
implements SwappableTable.LocalTableUpdateListener
IndexableData dataset whose data is a column in a SwappableTable
and whose indices are the row numbers of the column.
The column must be numeric.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIndexableNumericDataSwappableTable(SwappableTable swappableTable, String column, PlotInfo plotInfo) Creates an IndexableNumericDataSwappableTable instance. -
Method Summary
Modifier and TypeMethodDescriptiondoubleget(int i) Gets the value at the specifiedindexas a double.org.jfree.data.RangegetRange()Gets the range of values.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.IndexableNumericData
doubleIterator, getPlotInfo, streamMethods 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
-
IndexableNumericDataSwappableTable
public IndexableNumericDataSwappableTable(SwappableTable swappableTable, String column, PlotInfo plotInfo) Creates an IndexableNumericDataSwappableTable instance. The numeric 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 inswappableTableRuntimeException-columnmust be numeric
-
-
Method Details
-
size
public int size()Description copied from class:IndexableNumericDataGets the size of this dataset.- Specified by:
sizein classIndexableNumericData- Returns:
- size of this dataset
-
get
public double get(int i) Description copied from class:IndexableNumericDataGets the value at the specifiedindexas a double.- Specified by:
getin classIndexableNumericData- Parameters:
i- index- Returns:
- value at
indexas a double
-
onLocalTableUpdate
Description copied from interface:SwappableTable.LocalTableUpdateListenerUpdates this listener with the new table.- Specified by:
onLocalTableUpdatein interfaceSwappableTable.LocalTableUpdateListener- Parameters:
localTable- table
-
getRange
public org.jfree.data.Range getRange()Description copied from class:IndexableNumericDataGets the range of values. Default implementation assumes array backed data. Should be overridden for Table backed data.- Overrides:
getRangein classIndexableNumericData- Returns:
- range of values
-
onClose
public void onClose()Description copied from class:IndexableNumericDataTear down once a figure is removed.- Overrides:
onClosein classIndexableNumericData
-
snapshot
- Specified by:
snapshotin classLiveIndexableNumericData
-
getSwappableTable
-
getColumn
-