uk.ac.starlink.ttools
Class RandomJELRowReader

java.lang.Object
  |
  +--gnu.jel.DVMap
        |
        +--uk.ac.starlink.ttools.JELRowReader
              |
              +--uk.ac.starlink.ttools.RandomJELRowReader
All Implemented Interfaces:
gnu.jel.DVResolver

public class RandomJELRowReader
extends JELRowReader

Implements JELRowReader for a random access table.

Since:
8 Feb 2005

Field Summary
 
Fields inherited from class uk.ac.starlink.ttools.JELRowReader
COLUMN_ID_CHAR, NULL_QUERY_PREFIX
 
Constructor Summary
RandomJELRowReader(StarTable table)
          Constructs a new row reader for a random-access table.
 
Method Summary
 Object evaluateAtRow(gnu.jel.CompiledExpression compEx, long lrow)
          Evaluates a given compiled expression at a given row.
 Object getCell(int icol)
          Returns the cell at a given column in the current row.
 long getCurrentRow()
          Returns the current row for evaluations.
 void setCurrentRow(long lrow)
          Sets the current row for evaluations.
 
Methods inherited from class uk.ac.starlink.ttools.JELRowReader
evaluate, getBooleanArrayProperty, getBooleanProperty, getBooleanProperty, getByteArrayProperty, getByteProperty, getByteProperty, getCharArrayProperty, getCharProperty, getDateArrayProperty, getDateProperty, getDoubleArrayProperty, getDoubleProperty, getFloatArrayProperty, getFloatProperty, getIntArrayProperty, getIntProperty, getLongArrayProperty, getLongProperty, getLongProperty, getObjectArrayProperty, getObjectProperty, getObjectProperty, getShortArrayProperty, getShortProperty, getStringArrayProperty, getStringProperty, getTypeName, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomJELRowReader

public RandomJELRowReader(StarTable table)
Constructs a new row reader for a random-access table.

Parameters:
table - table object
Method Detail

getCurrentRow

public long getCurrentRow()
Returns the current row for evaluations.

Specified by:
getCurrentRow in class JELRowReader
Returns:
current row

setCurrentRow

public void setCurrentRow(long lrow)
Sets the current row for evaluations.

Parameters:
lrow - current row

evaluateAtRow

public Object evaluateAtRow(gnu.jel.CompiledExpression compEx,
                            long lrow)
                     throws Throwable
Evaluates a given compiled expression at a given row. The returned value is wrapped up as an object if the result of the expression is a primitive.

Parameters:
compEx - compiled expression
Throwable

getCell

public Object getCell(int icol)
               throws IOException
Returns the cell at a given column in the current row.

Specified by:
getCell in class JELRowReader
Parameters:
icol - column index
Returns:
cell at (getCurrentRow(),icol)
IOException

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.