ColumnSupplementpublic class PermutedColumnSupplement extends java.lang.Object implements ColumnSupplement
An int[] array, colMap, is used to keep track of which columns in this table correspond to which columns in the base table; the i'th column in this table corresponds to the colMap[i]'th column in the base table. The colMap array may contain duplicate entries, but all its entries must be in the range 0..baseSup.getColumnCount()-1. This table will have colMap.length columns.
| Constructor | Description |
|---|---|
PermutedColumnSupplement(uk.ac.starlink.table.StarTable baseTable,
int[] colMap) |
Constructs a permuted column supplement based on a given table.
|
PermutedColumnSupplement(ColumnSupplement baseSup,
int[] colMap) |
Constructs a permuted column supplement based on a given
column supplement.
|
| Modifier and Type | Method | Description |
|---|---|---|
SupplementSequence |
createSequence(uk.ac.starlink.table.RowSequence rseq) |
Returns a new iterator over the values in the columns defined by
this object.
|
java.lang.Object |
getCell(long irow,
int icol) |
Random access read of a cell defined by this object.
|
int |
getColumnCount() |
Returns the number of columns defined by this object.
|
uk.ac.starlink.table.ColumnInfo |
getColumnInfo(int icol) |
Returns the column metadata object for a given column.
|
java.lang.Object[] |
getRow(long irow) |
Random access read of a row defined by this object.
|
public PermutedColumnSupplement(ColumnSupplement baseSup, int[] colMap)
baseSup - column supplement supplying the base datacolMap - array of column indices, one for each column in this
objectpublic PermutedColumnSupplement(uk.ac.starlink.table.StarTable baseTable,
int[] colMap)
baseTable - table supplying the base datacolMap - array of column indices, one for each column in this
objectpublic int getColumnCount()
ColumnSupplementgetColumnCount in interface ColumnSupplementpublic uk.ac.starlink.table.ColumnInfo getColumnInfo(int icol)
ColumnSupplementgetColumnInfo in interface ColumnSupplementicol - column index within this objectpublic java.lang.Object getCell(long irow,
int icol)
throws java.io.IOException
ColumnSupplementgetCell in interface ColumnSupplementirow - row indexicol - column indexjava.io.IOExceptionpublic java.lang.Object[] getRow(long irow)
throws java.io.IOException
ColumnSupplementgetRow in interface ColumnSupplementirow - row indexjava.io.IOExceptionpublic SupplementSequence createSequence(uk.ac.starlink.table.RowSequence rseq) throws java.io.IOException
ColumnSupplementcreateSequence in interface ColumnSupplementrseq - row sequence providing data from the host tablejava.io.IOExceptionCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.