public class SequentialJELRowReader extends StarTableJELRowReader implements RowSequence
RowSequence
,
and this object should be treated in the same way as a row sequence
taken out on its table, that is iteration should proceed using the
next
and close
methods.PARAM_PREFIX, UCD_PREFIX, UTYPE_PREFIX
COLUMN_ID_CHAR, NULL_QUERY_PREFIX, OBJECT_PREFIX
Constructor and Description |
---|
SequentialJELRowReader(StarTable table)
Constructs a new row reader for sequential access.
|
SequentialJELRowReader(StarTable table,
RowSplittable rsplit)
Constructs a new row reader for sequential access,
based on a supplied row splittable.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Indicates that this sequence will not be required any more.
|
Object |
getCell(int icol)
Returns the value for a given column in this reader's table at
the current row.
|
long |
getCurrentRow()
If the current row is not known, an RuntimeException will be thrown.
|
Object[] |
getRow()
Returns the contents of the current table row, as an array
with the same number of elements as there are columns in this
table.
|
boolean |
next()
Attempts to advance the current row to the next one.
|
createDescribedValueConstant, getBooleanColumnValue, getByteColumnValue, getCharColumnValue, getColumnClass, getColumnIndexByName, getConstantByName, getDescribedValueByName, getDoubleColumnValue, getFloatColumnValue, getIntColumnValue, getLongColumnValue, getObjectColumnValue, getShortColumnValue, getSpecialByName, getTable, getUcdRegex, getUtypeRegex, isBlank, requiresRowIndex, valueDouble, valueInt, valueLong, valueObject, valueString
evaluate, evaluateBoolean, evaluateDouble, foundNull, getBooleanArrayProperty, getBooleanProperty, getBooleanProperty, getBooleanValue, getByteArrayProperty, getByteProperty, getByteValue, getCharArrayProperty, getCharProperty, getCharValue, getColumnIndex, getDateArrayProperty, getDoubleArrayProperty, getDoubleProperty, getDoubleValue, getFloatArrayProperty, getFloatProperty, getFloatValue, getIntArrayProperty, getIntProperty, getIntValue, getLongArrayProperty, getLongProperty, getLongValue, getNumberProperty, getObjectArrayProperty, getObjectProperty, getShortArrayProperty, getShortProperty, getShortValue, getStringArrayProperty, getStringProperty, getTranslatedColumns, getTranslatedConstants, getTypeName, setFailOnNull, stripPrefix, translate
public SequentialJELRowReader(StarTable table) throws IOException
table
.table
- table to readIOException
public SequentialJELRowReader(StarTable table, RowSplittable rsplit)
Note if the RowSplittable.rowIndex()
method
of the supplied RowSplittable returns null,
the getCurrentRow()
method of the object constructed
here will throw an exception.
Before using this reader to evaluate an expression,
the StarTableJELRowReader.requiresRowIndex()
method should be called to determine
if trouble lies ahead.
table
- table to readrsplit
- row splittable, must apply to the supplied tablepublic Object getCell(int icol) throws IOException
StarTableJELRowReader
getCell
in interface RowData
getCell
in interface RowSequence
getCell
in class StarTableJELRowReader
icol
- column indexicol
at the current rowIOException
- if there is an error reading the datapublic Object[] getRow() throws IOException
RowSequence
next
has not yet been called).getRow
in interface RowData
getRow
in interface RowSequence
irow
IOException
- if there is an error reading the datapublic boolean next() throws IOException
RowSequence
true
is returned the attempt has been successful,
and if false
is returned there are no more rows in this
sequence.
Since the initial position of a RowSequence is before the first row,
this method must be called before current row data
can be accessed using the
RowSequence.getCell(int)
or RowSequence.getRow()
methods.next
in interface RowSequence
next
in interface Sequence
true
iff this sequence has been advanced to the
next rowIOException
- if there is some errorpublic long getCurrentRow()
getCurrentRow
in class StarTableJELRowReader
public void close() throws IOException
RowSequence
close
is undefined.close
in interface Closeable
close
in interface AutoCloseable
close
in interface RowSequence
IOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.