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 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
-
-
-
-
Method Detail
-
isRandom
public boolean isRandom()
Returns true.- Specified by:
isRandom
in interfaceStarTable
- Overrides:
isRandom
in classAbstractStarTable
- Returns:
- true
-
getRowSequence
public RowSequence getRowSequence()
Returns a RowSequence object based on the random data access methods of this table.- Specified by:
getRowSequence
in interfaceStarTable
- Specified by:
getRowSequence
in 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:
getRowCount
in interfaceStarTable
- Specified by:
getRowCount
in classAbstractStarTable
- Returns:
- the number of rows in the table
-
-