public class RowSubsetStarTable extends WrapperStarTable
BitSet
is used to keep track of which rows in the
base table should be visible from this one; a set (true) bit in the
mask indicates a row in the base table which will be visible in this one.
It is the responsibility of the user to ensure that no bits in the
mask are set beyond the end of the underlying table - behaviour is
undefined in the case that this condition is violated (but probably
procured RowSequence objects will misbehave).baseTable
Constructor and Description |
---|
RowSubsetStarTable(StarTable baseTable)
Constructs a new RowSubsetStarTable with no rows showing,
in which a set bit in the mask indicates a visible row.
|
RowSubsetStarTable(StarTable baseTable,
BitSet mask)
Constructs a new RowSubsetStarTable with a given mask.
|
Modifier and Type | Method and Description |
---|---|
BitSet |
getMask()
Returns the bit mask which defines which rows are seen.
|
long |
getRowCount()
Returns the number of rows in this table, if known.
|
RowSequence |
getRowSequence()
Returns an object which can iterate over all the rows in the table
sequentially.
|
RowSplittable |
getRowSplittable()
Returns an object which can iterate over all the rows in the table,
but which may also be requested to split recursively
for potentially parallel processing.
|
boolean |
isRandom()
Returns false.
|
void |
setMask(BitSet mask)
Sets the mask which determines which rows are seen.
|
checkedLongToInt, close, getBaseTable, getCell, getColumnAuxDataInfos, getColumnCount, getColumnInfo, getName, getParameterByName, getParameters, getRow, getRowAccess, getURL, setName, setParameter, setURL, toString
public RowSubsetStarTable(StarTable baseTable)
baseTable
- base table which provides the underlying datapublic BitSet getMask()
public void setMask(BitSet mask)
mask
- row maskpublic boolean isRandom()
isRandom
in interface StarTable
isRandom
in class WrapperStarTable
true
if table random access methods are availablepublic long getRowCount()
StarTable
getRowCount
in interface StarTable
getRowCount
in class WrapperStarTable
public RowSequence getRowSequence() throws IOException
StarTable
getRowSequence
in interface StarTable
getRowSequence
in class WrapperStarTable
IOException
- if there is an error providing accesspublic RowSplittable getRowSplittable() throws IOException
StarTable
The return value must be non-null, and may provide splitting
arrangements specially appropriate for the implementation.
If this table 'wraps' an upstream table, it is usually best to
base the implementation on calls to the the upstream
getRowSplittable
method, so that upstream policy
about how to divide up the table is respected.
However, implementations without special requirements may return
Tables.getDefaultRowSplittable
(this)
.
getRowSplittable
in interface StarTable
getRowSplittable
in class WrapperStarTable
IOException
RowRunner
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.