# Interface ColumnSupplement

All Known Implementing Classes:
  `CalculatorColumnSupplement, JELColumnSupplement, PermutedColumnSupplement, UnitColumnSupplement`

public interface ColumnSupplement
Defines additional column metadata and data for supplementing the existing columns in a StarTable. The data will typically be acquired by reference to a host table, for instance calculating cell values in the additional columns on the basis of values for columns in the host table. The columns are assumed to have the same row count as the host table.

Since:
  2 Apr 2012
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`SupplementData`
`createSupplementData(uk.ac.starlink.table.RowData rdata)`
Returns a new accessor for the values in the columns defined by this object.
`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.
`Object[]`
`getRow(long irow)`
Random access read of a row defined by this object.

## Method Details

### getColumnCount

int getColumnCount()
Returns the number of columns defined by this object.

Returns:
  number of columns

### getColumnInfo

uk.ac.starlink.table.ColumnInfo getColumnInfo(int icol)
Returns the column metadata object for a given column.

Parameters:
  `icol` - column index within this object
Returns:
  column metadata for the icol'th column defined by this object

### getCell

Object getCell(long irow, int icol) throws IOException
Random access read of a cell defined by this object.

Parameters:
  `irow` - row index
  `icol` - column index
Returns:
  cell content
Throws:
  `IOException`

### getRow

Object[] getRow(long irow) throws IOException
Random access read of a row defined by this object.

Parameters:
  `irow` - row index
Returns:
  array of cell contents for all the cells in this row
Throws:
  `IOException`

### createSupplementData

SupplementData createSupplementData(uk.ac.starlink.table.RowData rdata) throws IOException
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.

Parameters:
  `rdata` - row accessor providing data from the host table
Returns:
  accessor over row data from supplementary columns
Throws:
  `IOException`