uk.ac.starlink.table
Class RandomStarTable

java.lang.Object
  extended by uk.ac.starlink.table.AbstractStarTable
      extended by uk.ac.starlink.table.RandomStarTable
All Implemented Interfaces:
StarTable
Direct Known Subclasses:
BeanStarTable, ColumnStarTable, ConstantStarTable, FitsStarTable, RandomResultSetStarTable, RowListStarTable

public abstract class RandomStarTable
extends AbstractStarTable

Implements a StarTable based on random access. The isRandom method always returns true, and the getRowSequence method is implemented using the table's (abstract) getCell and getRow methods.

Implementations of this object must supply a non-negative return value for getColumnCount method, because the RowSequence method requires this knowledge.


Constructor Summary
RandomStarTable()
           
 
Method Summary
abstract  long getRowCount()
          The number of rows in this table.
 RowSequence getRowSequence()
          Returns a RowSequence object based on the random data access methods of this table.
 boolean isRandom()
          Returns true.
 
Methods inherited from class uk.ac.starlink.table.AbstractStarTable
checkedLongToInt, getCell, getColumnAuxDataInfos, getColumnCount, getColumnInfo, 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

RandomStarTable

public RandomStarTable()
Method Detail

isRandom

public boolean isRandom()
Returns true.

Specified by:
isRandom in interface StarTable
Overrides:
isRandom in class AbstractStarTable
Returns:
true

getRowSequence

public RowSequence getRowSequence()
Returns a RowSequence object based on the random data access methods of this table.

Specified by:
getRowSequence in interface StarTable
Specified by:
getRowSequence in class AbstractStarTable
Returns:
a row iterator

getRowCount

public abstract long getRowCount()
The number of rows in this table. Implementations must supply a non-negative return value.

Specified by:
getRowCount in interface StarTable
Specified by:
getRowCount in class AbstractStarTable
Returns:
the number of rows in the table