Package uk.ac.starlink.table
Class RowRandomWrapperStarTable
- java.lang.Object
-
- uk.ac.starlink.table.WrapperStarTable
-
- uk.ac.starlink.table.RandomWrapperStarTable
-
- uk.ac.starlink.table.RowRandomWrapperStarTable
-
- All Implemented Interfaces:
StarTable
public class RowRandomWrapperStarTable extends RandomWrapperStarTable
RandomWrapperStarTable which works by storing rows in an ArrayList.- Author:
- Mark Taylor (Starlink)
- See Also:
ColumnRandomWrapperStarTable
-
-
Field Summary
-
Fields inherited from class uk.ac.starlink.table.WrapperStarTable
baseTable
-
-
Constructor Summary
Constructors Constructor Description RowRandomWrapperStarTable(StarTable baseTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object[]
retrieveStoredRow(long lrow)
Retrieves the row stored by the lrow'th invocation ofRandomWrapperStarTable.storeNextRow(java.lang.Object[])
.protected void
storeNextRow(java.lang.Object[] row)
Stores the next row encountered in the base table's row sequence.-
Methods inherited from class uk.ac.starlink.table.RandomWrapperStarTable
getCell, getColumnCount, getColumnInfo, getRow, getRowCount, getRowSequence, getURL, isRandom
-
Methods inherited from class uk.ac.starlink.table.WrapperStarTable
checkedLongToInt, getBaseTable, getColumnAuxDataInfos, getName, getParameterByName, getParameters, setName, setParameter, setURL, toString
-
-
-
-
Constructor Detail
-
RowRandomWrapperStarTable
public RowRandomWrapperStarTable(StarTable baseTable) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
storeNextRow
protected void storeNextRow(java.lang.Object[] row)
Description copied from class:RandomWrapperStarTable
Stores the next row encountered in the base table's row sequence. This will be called up to getRowCount times with the contents of each row of the base table in sequence. Implementations should store it in some way that it can be retrieved byRandomWrapperStarTable.retrieveStoredRow(long)
.- Specified by:
storeNextRow
in classRandomWrapperStarTable
- Parameters:
row
- the row to store
-
retrieveStoredRow
protected java.lang.Object[] retrieveStoredRow(long lrow)
Description copied from class:RandomWrapperStarTable
Retrieves the row stored by the lrow'th invocation ofRandomWrapperStarTable.storeNextRow(java.lang.Object[])
. This method will not be called with a value of lrow greater than or equal to the number of times storeNextRow has been called already.- Specified by:
retrieveStoredRow
in classRandomWrapperStarTable
- Parameters:
lrow
- the index of the row to retrieve- Returns:
- the lrow'th row to be stored by
RandomWrapperStarTable.storeNextRow(java.lang.Object[])
-
-