Package uk.ac.starlink.ttools.filter
Class UnitColumnSupplement
java.lang.Object
uk.ac.starlink.ttools.filter.UnitColumnSupplement
- All Implemented Interfaces:
ColumnSupplement
Trivial ColumnSupplement implementation which contains all the
columns of a base table unchanged.
- Since:
- 2 Apr 2012
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSupplementData
(uk.ac.starlink.table.RowData rdata) Returns a new accessor for the values in the columns defined by this object.getCell
(long irow, int icol) Random access read of a cell defined by this object.int
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.Object[]
getRow
(long irow) Random access read of a row defined by this object.
-
Constructor Details
-
UnitColumnSupplement
public UnitColumnSupplement(uk.ac.starlink.table.StarTable table) Constructor.- Parameters:
table
- base table
-
-
Method Details
-
getColumnCount
public int getColumnCount()Description copied from interface:ColumnSupplement
Returns the number of columns defined by this object.- Specified by:
getColumnCount
in interfaceColumnSupplement
- Returns:
- number of columns
-
getColumnInfo
public uk.ac.starlink.table.ColumnInfo getColumnInfo(int icol) Description copied from interface:ColumnSupplement
Returns the column metadata object for a given column.- Specified by:
getColumnInfo
in interfaceColumnSupplement
- Parameters:
icol
- column index within this object- Returns:
- column metadata for the icol'th column defined by this object
-
getCell
Description copied from interface:ColumnSupplement
Random access read of a cell defined by this object.- Specified by:
getCell
in interfaceColumnSupplement
- Parameters:
irow
- row indexicol
- column index- Returns:
- cell content
- Throws:
IOException
-
getRow
Description copied from interface:ColumnSupplement
Random access read of a row defined by this object.- Specified by:
getRow
in interfaceColumnSupplement
- Parameters:
irow
- row index- Returns:
- array of cell contents for all the cells in this row
- Throws:
IOException
-
createSupplementData
Description copied from interface:ColumnSupplement
Returns a new accessor for the values in the columns defined by this object. The supplied row object must be from an appropriate host table; if not, behaviour is undefined.- Specified by:
createSupplementData
in interfaceColumnSupplement
- Parameters:
rdata
- row accessor providing data from the host table- Returns:
- accessor over row data from supplementary columns
- Throws:
IOException
-