Package uk.ac.starlink.table
Class RandomStarTable
- java.lang.Object
-
- uk.ac.starlink.table.AbstractStarTable
-
- uk.ac.starlink.table.RandomStarTable
-
- All Implemented Interfaces:
StarTable
- Direct Known Subclasses:
BeanStarTable,ColumnStarTable,ConstantStarTable,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.
- Author:
- Mark Taylor (Starlink)
-
-
Constructor Summary
Constructors Constructor Description RandomStarTable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract longgetRowCount()The number of rows in this table.RowSequencegetRowSequence()Returns a RowSequence object based on the random data access methods of this table.booleanisRandom()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
-
-
-
-
Method Detail
-
isRandom
public boolean isRandom()
Returns true.- Specified by:
isRandomin interfaceStarTable- Overrides:
isRandomin classAbstractStarTable- Returns:
- true
-
getRowSequence
public RowSequence getRowSequence()
Returns a RowSequence object based on the random data access methods of this table.- Specified by:
getRowSequencein interfaceStarTable- Specified by:
getRowSequencein classAbstractStarTable- 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:
getRowCountin interfaceStarTable- Specified by:
getRowCountin classAbstractStarTable- Returns:
- the number of rows in the table
-
-