|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.data.append.column.AppendedColumnTable
public class AppendedColumnTable
A table that appends columns to a given input table. The new columns' values
are provided by an
AppendedCellFactory
.
This implementation does not verify that the generated cells (from the factory) actually fit to the column spec. Instead, this is checked dynamically in the iterator.
Constructor Summary | |
---|---|
AppendedColumnTable(DataTable table,
AppendedCellFactory cellFactory,
DataColumnSpec... appendColSpec)
Creates new table. |
|
AppendedColumnTable(DataTable table,
Map<RowKey,DataCell> map,
DataColumnSpec... appendedColSpec)
Create new table based on an underlying table with a map providing the row key --> new cell mapping. |
Method Summary | |
---|---|
(package private) DataType[] |
getAppendedColumnClasses()
Get the class values of the appended columns. |
(package private) RowIterator |
getBaseIterator()
Get new iterator over the underlying table. |
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
(package private) AppendedCellFactory |
getFactory()
Get reference to the constructor argument. |
static DataTableSpec |
getTableSpec(DataTableSpec table,
DataColumnSpec... cols)
Get table spec that is generated when the table is extended by the columns. |
RowIterator |
iterator()
Returns a row iterator which returns each row one-by-one from the table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AppendedColumnTable(DataTable table, AppendedCellFactory cellFactory, DataColumnSpec... appendColSpec)
table
- the underlying table providing the first columnscellFactory
- a factory providing the content of the new columnsappendColSpec
- the column specs for the new columns.public AppendedColumnTable(DataTable table, Map<RowKey,DataCell> map, DataColumnSpec... appendedColSpec)
table
- the underlying tablemap
- tTe map that has to contain all mappings of row key to
new cell. If it does not contain all, an exception is throw
while iterating over the table.appendedColSpec
- the column specs of the new column
NullPointerException
- if any argument is null
Method Detail |
---|
public DataTableSpec getDataTableSpec()
DataTableSpec
object of this table which gives
information about the structure of this data table.
getDataTableSpec
in interface DataTable
public RowIterator iterator()
iterator
in interface Iterable<DataRow>
iterator
in interface DataTable
DataRow
RowIterator getBaseIterator()
AppendedCellFactory getFactory()
DataType[] getAppendedColumnClasses()
public static final DataTableSpec getTableSpec(DataTableSpec table, DataColumnSpec... cols)
table
- the underlying tablecols
- the column specs by which table
is extended
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |