uk.ac.starlink.ttools.task
Class LoopStarTable

java.lang.Object
  extended by uk.ac.starlink.table.AbstractStarTable
      extended by uk.ac.starlink.table.RandomStarTable
          extended by uk.ac.starlink.table.ColumnStarTable
              extended by uk.ac.starlink.ttools.task.LoopStarTable
All Implemented Interfaces:
StarTable

public class LoopStarTable
extends ColumnStarTable

Single-column table whose column values are the values of a loop iterator variable.

Since:
6 Nov 2013
Author:
Mark Taylor

Field Summary
 
Fields inherited from class uk.ac.starlink.table.ColumnStarTable
columns
 
Constructor Summary
LoopStarTable(String colName, double start, double end, double step, Boolean isInteger)
          Constructs a loop table from values like the initialisers of a for loop.
 
Method Summary
 long getRowCount()
          Gets the number of rows in the table (which must be applicable to all the columns).
 
Methods inherited from class uk.ac.starlink.table.ColumnStarTable
addColumn, getCell, getColumnCount, getColumnData, getColumnInfo, makeTableWithRows, setCell, setColumn
 
Methods inherited from class uk.ac.starlink.table.RandomStarTable
getRowSequence, isRandom
 
Methods inherited from class uk.ac.starlink.table.AbstractStarTable
checkedLongToInt, getColumnAuxDataInfos, getName, getParameterByName, getParameters, getRow, getURL, setName, setParameter, setParameters, setURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopStarTable

public LoopStarTable(String colName,
                     double start,
                     double end,
                     double step,
                     Boolean isInteger)
Constructs a loop table from values like the initialisers of a for loop. The isInteger parameter may be set True for an Integer column, False for a Double column, and null if the type is to be determined from the input values (integer if all are integers).

Parameters:
colName - name of the single column name in the table
start - initial (row 0) value of variable
end - value which variable will not exceed
step - per-row increment of variable
Method Detail

getRowCount

public long getRowCount()
Description copied from class: ColumnStarTable
Gets the number of rows in the table (which must be applicable to all the columns). Since this is a RandomStarTable the return value must be non-negative.

Specified by:
getRowCount in interface StarTable
Specified by:
getRowCount in class ColumnStarTable
Returns:
number of rows


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.