public abstract class RandomWrapperStarTable extends WrapperStarTable
Changes in the number of columns of the base table will not be reflected in this table. Changes in the data elements may or may not be reflected.
Concrete subclasses have to provide implementations of the
storeNextRow(java.lang.Object[]) and retrieveStoredRow(long) methods.
baseTable| Constructor and Description |
|---|
RandomWrapperStarTable(StarTable baseTable)
Constructs a new random access table from a base table.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getCell(long lrow,
int icol)
Returns the contents of a given table cell.
|
int |
getColumnCount()
Returns the number of columns.
|
ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column.
|
java.lang.Object[] |
getRow(long lrow)
Returns the contents of a given table row.
|
long |
getRowCount()
Returns the number of rows in this table, if known.
|
RowSequence |
getRowSequence()
Returns a RowSequence object based on the random data
access methods of this table.
|
java.net.URL |
getURL()
Returns the URL of the base table.
|
boolean |
isRandom()
Returns true.
|
protected abstract java.lang.Object[] |
retrieveStoredRow(long lrow)
Retrieves the row stored by the lrow'th invocation of
storeNextRow(java.lang.Object[]). |
protected abstract void |
storeNextRow(java.lang.Object[] row)
Stores the next row encountered in the base table's row sequence.
|
checkedLongToInt, getBaseTable, getColumnAuxDataInfos, getName, getParameterByName, getParameters, setName, setParameter, setURL, toStringpublic RandomWrapperStarTable(StarTable baseTable) throws java.io.IOException
baseTable - the base StarTablejava.io.IOExceptionprotected abstract void storeNextRow(java.lang.Object[] row)
retrieveStoredRow(long).row - the row to storeprotected abstract java.lang.Object[] retrieveStoredRow(long lrow)
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.lrow - the index of the row to retrievestoreNextRow(java.lang.Object[])public boolean isRandom()
isRandom in interface StarTableisRandom in class WrapperStarTablepublic int getColumnCount()
getColumnCount in interface StarTablegetColumnCount in class WrapperStarTablepublic long getRowCount()
StarTablegetRowCount in interface StarTablegetRowCount in class WrapperStarTablepublic java.net.URL getURL()
getURL in interface StarTablegetURL in class WrapperStarTablepublic ColumnInfo getColumnInfo(int icol)
StarTablegetColumnInfo in interface StarTablegetColumnInfo in class WrapperStarTableicol - the column for which header information is requiredpublic java.lang.Object[] getRow(long lrow)
throws java.io.IOException
StarTablegetRow in interface StarTablegetRow in class WrapperStarTablelrow - the index of the row to retrievejava.io.IOException - if there is an error reading the datapublic java.lang.Object getCell(long lrow,
int icol)
throws java.io.IOException
StarTablegetCell in interface StarTablegetCell in class WrapperStarTablelrow - the index of the cell's rowicol - the index of the cell's columnjava.io.IOException - if there is an error reading the datapublic RowSequence getRowSequence() throws java.io.IOException
getRowSequence in interface StarTablegetRowSequence in class WrapperStarTablejava.io.IOException - if there is an error providing access