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:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description IndexableNumericDataSwappableTable(SwappableTable swappableTable, String column, PlotInfo plotInfo)
Creates an IndexableNumericDataSwappableTable instance. -
Method Summary
Modifier and Type Method Description double
get(int i)
Gets the value at the specifiedindex
as a double.String
getColumn()
org.jfree.data.Range
getRange()
Gets the range of values.SwappableTable
getSwappableTable()
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.IndexableNumericData
snapshot()
Methods inherited from class com.illumon.iris.db.plot.datasets.data.IndexableNumericData
doubleIterator, getPlotInfo, stream
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
-
IndexableNumericDataSwappableTable
public IndexableNumericDataSwappableTable(SwappableTable swappableTable, String column, PlotInfo plotInfo)Creates an IndexableNumericDataSwappableTable instance. The numeric 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
RuntimeException
-column
must be numeric
-
-
Method Details
-
size
public int size()Description copied from class:IndexableNumericData
Gets the size of this dataset.- Specified by:
size
in classIndexableNumericData
- Returns:
- size of this dataset
-
get
public double get(int i)Description copied from class:IndexableNumericData
Gets the value at the specifiedindex
as a double.- Specified by:
get
in classIndexableNumericData
- Parameters:
i
- index- Returns:
- value at
index
as a double
-
onLocalTableUpdate
Description copied from interface:SwappableTable.LocalTableUpdateListener
Updates this listener with the new table.- Specified by:
onLocalTableUpdate
in interfaceSwappableTable.LocalTableUpdateListener
- Parameters:
localTable
- table
-
getRange
public org.jfree.data.Range getRange()Description copied from class:IndexableNumericData
Gets the range of values. Default implementation assumes array backed data. Should be overridden for Table backed data.- Overrides:
getRange
in classIndexableNumericData
- Returns:
- range of values
-
onClose
public void onClose()Description copied from class:IndexableNumericData
Tear down once a figure is removed.- Overrides:
onClose
in classIndexableNumericData
-
snapshot
- Specified by:
snapshot
in classLiveIndexableNumericData
-
getSwappableTable
-
getColumn
-