StarTable
ColumnRandomWrapperStarTable
, RowRandomWrapperStarTable
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 | Description |
---|---|
RandomWrapperStarTable(StarTable baseTable) |
Constructs a new random access table from a base table.
|
Modifier and Type | Method | 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkedLongToInt, getBaseTable, getColumnAuxDataInfos, getName, getParameterByName, getParameters, setName, setParameter, setURL, toString
public RandomWrapperStarTable(StarTable baseTable) throws java.io.IOException
baseTable
- the base StarTablejava.io.IOException
protected 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 StarTable
isRandom
in class WrapperStarTable
public int getColumnCount()
getColumnCount
in interface StarTable
getColumnCount
in class WrapperStarTable
public long getRowCount()
StarTable
getRowCount
in interface StarTable
getRowCount
in class WrapperStarTable
public java.net.URL getURL()
getURL
in interface StarTable
getURL
in class WrapperStarTable
public ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
getColumnInfo
in class WrapperStarTable
icol
- the column for which header information is requiredpublic java.lang.Object[] getRow(long lrow) throws java.io.IOException
StarTable
getRow
in interface StarTable
getRow
in class WrapperStarTable
lrow
- 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
StarTable
getCell
in interface StarTable
getCell
in class WrapperStarTable
lrow
- 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 StarTable
getRowSequence
in class WrapperStarTable
java.io.IOException
- if there is an error providing accessCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.