ColumnSupplement
public abstract class CalculatorColumnSupplement extends java.lang.Object implements ColumnSupplement
calculate(java.lang.Object[])
method.Constructor | Description |
---|---|
CalculatorColumnSupplement(ColumnSupplement baseSup,
uk.ac.starlink.table.ColumnInfo[] outColInfos) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected abstract java.lang.Object[] |
calculate(java.lang.Object[] inRow) |
Performs the calculations which populate the columns of this table.
|
SupplementSequence |
createSequence(uk.ac.starlink.table.RowSequence rseq) |
Returns a new iterator over the values in the columns defined by
this object.
|
java.lang.Object |
getCell(long irow,
int icol) |
Random access read of a cell defined by this object.
|
int |
getColumnCount() |
Returns the number of columns defined by this object.
|
uk.ac.starlink.table.ColumnInfo |
getColumnInfo(int icol) |
Returns the column metadata object for a given column.
|
static double |
getDouble(java.lang.Object value) |
Utility method to turn an Object into a floating point value.
|
java.lang.Object[] |
getRow(long irow) |
Random access read of a row defined by this object.
|
public CalculatorColumnSupplement(ColumnSupplement baseSup, uk.ac.starlink.table.ColumnInfo[] outColInfos)
baseSup
- base supplementoutColInfos
- column metadata for the supplementary columns
(length defines column count)protected abstract java.lang.Object[] calculate(java.lang.Object[] inRow) throws java.io.IOException
The implementation must return a new array each time,
not repopulate the same Object[]
array object.
inRow
- input column valuesjava.io.IOException
public int getColumnCount()
ColumnSupplement
getColumnCount
in interface ColumnSupplement
public uk.ac.starlink.table.ColumnInfo getColumnInfo(int icol)
ColumnSupplement
getColumnInfo
in interface ColumnSupplement
icol
- column index within this objectpublic java.lang.Object[] getRow(long irow) throws java.io.IOException
ColumnSupplement
getRow
in interface ColumnSupplement
irow
- row indexjava.io.IOException
public java.lang.Object getCell(long irow, int icol) throws java.io.IOException
ColumnSupplement
getCell
in interface ColumnSupplement
irow
- row indexicol
- column indexjava.io.IOException
public SupplementSequence createSequence(uk.ac.starlink.table.RowSequence rseq) throws java.io.IOException
ColumnSupplement
createSequence
in interface ColumnSupplement
rseq
- row sequence providing data from the host tablejava.io.IOException
public static double getDouble(java.lang.Object value)
value
- object valueCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.