Class RandomJELRowReader


  • public class RandomJELRowReader
    extends StarTableJELRowReader
    Implements JELRowReader for a random access table.
    Since:
    8 Feb 2005
    Author:
    Mark Taylor (Starlink)
    • Constructor Detail

      • RandomJELRowReader

        public RandomJELRowReader​(uk.ac.starlink.table.StarTable table)
        Constructs a new row reader for a random-access table.
        Parameters:
        table - table object
    • Method Detail

      • setCurrentRow

        public void setCurrentRow​(long lrow)
        Sets the current row for evaluations.
        Parameters:
        lrow - current row
      • evaluateAtRow

        public java.lang.Object evaluateAtRow​(gnu.jel.CompiledExpression compEx,
                                              long lrow)
                                       throws java.lang.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
        Throws:
        java.lang.Throwable
      • getCell

        public java.lang.Object getCell​(int icol)
                                 throws java.io.IOException
        Returns the cell at a given column in the current row.
        Specified by:
        getCell in class StarTableJELRowReader
        Parameters:
        icol - column index
        Returns:
        cell at (getCurrentRow(),icol)
        Throws:
        java.io.IOException