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.
- See Also:
ColumnRandomWrapperStarTable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RowRandomWrapperStarTable
public RowRandomWrapperStarTable(StarTable baseTable)
throws IOException
getRowCount
public long getRowCount()
- Description copied from interface:
StarTable
- Returns the number of rows in this table, if known. If the number
of rows cannot be (easily) determined, a value of -1 will be returned.
- Specified by:
getRowCount
in interface StarTable
- Overrides:
getRowCount
in class WrapperStarTable
- Returns:
- the number of rows, or -1
storeNextRow
protected void storeNextRow(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 by
RandomWrapperStarTable.retrieveStoredRow(long)
.
- Specified by:
storeNextRow
in class RandomWrapperStarTable
- Parameters:
row
- the row to store
retrieveStoredRow
protected Object[] retrieveStoredRow(long lrow)
- Description copied from class:
RandomWrapperStarTable
- Retrieves the row stored by the lrow'th invocation of
RandomWrapperStarTable.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 class RandomWrapperStarTable
- Parameters:
lrow
- the index of the row to retrieve
- Returns:
- the lrow'th row to be stored by
RandomWrapperStarTable.storeNextRow(java.lang.Object[])