Package uk.ac.starlink.ttools.jel
Class SequentialJELRowReader
- java.lang.Object
-
- gnu.jel.DVMap
-
- uk.ac.starlink.ttools.jel.JELRowReader
-
- uk.ac.starlink.ttools.jel.StarTableJELRowReader
-
- uk.ac.starlink.ttools.jel.SequentialJELRowReader
-
- All Implemented Interfaces:
uk.ac.starlink.table.RowSequence
public class SequentialJELRowReader extends StarTableJELRowReader implements uk.ac.starlink.table.RowSequence
Implements JELRowReader for sequential access to a table. This class also implementsRowSequence
, 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.- Since:
- 8 Feb 2005
- Author:
- Mark Taylor (Starlink)
-
-
Field Summary
-
Fields inherited from class uk.ac.starlink.ttools.jel.StarTableJELRowReader
PARAM_PREFIX, UCD_PREFIX, UTYPE_PREFIX
-
Fields inherited from class uk.ac.starlink.ttools.jel.JELRowReader
COLUMN_ID_CHAR, NULL_QUERY_PREFIX, OBJECT_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SequentialJELRowReader(uk.ac.starlink.table.StarTable table)
Constructs a new row reader for sequential access.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.lang.Object
getCell(int icol)
Returns the value for a given column in this reader's table at the current row.long
getCurrentRow()
Returns the index of the row on which evaluations are currently taking place.java.lang.Object[]
getRow()
boolean
next()
-
Methods inherited from class uk.ac.starlink.ttools.jel.StarTableJELRowReader
createDescribedValueConstant, getBooleanColumnValue, getByteColumnValue, getCharColumnValue, getColumnClass, getColumnIndexByName, getConstantByName, getDoubleColumnValue, getFloatColumnValue, getIntColumnValue, getLongColumnValue, getObjectColumnValue, getShortColumnValue, getSpecialByName, getTable, getUcdRegex, getUtypeRegex, isBlank
-
Methods inherited from class uk.ac.starlink.ttools.jel.JELRowReader
evaluate, 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, getTypeName, setFailOnNull, stripPrefix, translate
-
-
-
-
Constructor Detail
-
SequentialJELRowReader
public SequentialJELRowReader(uk.ac.starlink.table.StarTable table) throws java.io.IOException
Constructs a new row reader for sequential access. This constructor also takes out a row sequence on table.- Parameters:
table
- table to read- Throws:
java.io.IOException
-
-
Method Detail
-
getCell
public java.lang.Object getCell(int icol) throws java.io.IOException
Description copied from class:StarTableJELRowReader
Returns the value for a given column in this reader's table at the current row.- Specified by:
getCell
in interfaceuk.ac.starlink.table.RowSequence
- Specified by:
getCell
in classStarTableJELRowReader
- Parameters:
icol
- column index- Returns:
- contents of column icol at the current row
- Throws:
java.io.IOException
-
getRow
public java.lang.Object[] getRow() throws java.io.IOException
- Specified by:
getRow
in interfaceuk.ac.starlink.table.RowSequence
- Throws:
java.io.IOException
-
next
public boolean next() throws java.io.IOException
- Specified by:
next
in interfaceuk.ac.starlink.table.RowSequence
- Throws:
java.io.IOException
-
getCurrentRow
public long getCurrentRow()
Description copied from class:StarTableJELRowReader
Returns the index of the row on which evaluations are currently taking place.- Specified by:
getCurrentRow
in classStarTableJELRowReader
- Returns:
- row index (first row is 0)
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfaceuk.ac.starlink.table.RowSequence
- Throws:
java.io.IOException
-
-