Package uk.ac.starlink.ttools.filter
Class UnitColumnSupplement
- java.lang.Object
-
- uk.ac.starlink.ttools.filter.UnitColumnSupplement
-
- All Implemented Interfaces:
ColumnSupplement
public class UnitColumnSupplement extends java.lang.Object implements ColumnSupplement
Trivial ColumnSupplement implementation which contains all the columns of a base table unchanged.- Since:
- 2 Apr 2012
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description UnitColumnSupplement(uk.ac.starlink.table.StarTable table)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SupplementSequencecreateSequence(uk.ac.starlink.table.RowSequence rseq)Returns a new iterator over the values in the columns defined by this object.java.lang.ObjectgetCell(long irow, int icol)Random access read of a cell defined by this object.intgetColumnCount()Returns the number of columns defined by this object.uk.ac.starlink.table.ColumnInfogetColumnInfo(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.
-
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
Description copied from interface:ColumnSupplementReturns the number of columns defined by this object.- Specified by:
getColumnCountin interfaceColumnSupplement- Returns:
- number of columns
-
getColumnInfo
public uk.ac.starlink.table.ColumnInfo getColumnInfo(int icol)
Description copied from interface:ColumnSupplementReturns the column metadata object for a given column.- Specified by:
getColumnInfoin interfaceColumnSupplement- Parameters:
icol- column index within this object- Returns:
- column metadata for the icol'th column defined by this object
-
getCell
public java.lang.Object getCell(long irow, int icol) throws java.io.IOExceptionDescription copied from interface:ColumnSupplementRandom access read of a cell defined by this object.- Specified by:
getCellin interfaceColumnSupplement- Parameters:
irow- row indexicol- column index- Returns:
- cell content
- Throws:
java.io.IOException
-
getRow
public java.lang.Object[] getRow(long irow) throws java.io.IOExceptionDescription copied from interface:ColumnSupplementRandom access read of a row defined by this object.- Specified by:
getRowin interfaceColumnSupplement- Parameters:
irow- row index- Returns:
- array of cell contents for all the cells in this row
- Throws:
java.io.IOException
-
createSequence
public SupplementSequence createSequence(uk.ac.starlink.table.RowSequence rseq) throws java.io.IOException
Description copied from interface:ColumnSupplementReturns a new iterator over the values in the columns defined by this object. The supplied row sequence must be from an appropriate host table; if not, behaviour is undefined.- Specified by:
createSequencein interfaceColumnSupplement- Parameters:
rseq- row sequence providing data from the host table- Returns:
- iterator over row data from supplementary columns
- Throws:
java.io.IOException
-
-