|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.data.append.row.AppendedRowsTable
public class AppendedRowsTable
DataTable
implementation that concatenates a set of DataTable
objects. All tables should have the same columns (identified by their column
name). Missing columns in tables are tried to be filled with missing cells
(where it is possible - so far for string, double, int). Non matching column
types are adjusted such that they match (if not possible, the column's type
is DataCell
).
The order of colums of this table is determined by the order of the top table (the first array argument in the constructor)
Constructor Summary | |
---|---|
AppendedRowsTable(DataTable... tables)
Concatenates a set of tables. |
|
AppendedRowsTable(String suffix,
DataTable... tables)
Concatenates a set of tables. |
Method Summary | |
---|---|
static DataTableSpec |
generateDataTableSpec(DataTableSpec... tableSpecs)
Factory method that determines the final DataTableSpec given the
tables. |
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
RowIterator |
iterator()
Returns a row iterator which returns each row one-by-one from the table. |
AppendedRowsIterator |
iterator(ExecutionMonitor exec,
int totalRowCount)
Get an iterator whose RowIterator.next() method may throw an
exception if the execution is canceled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AppendedRowsTable(DataTable... tables)
tables
- all tables to be appended
NullPointerException
- if argument is null
or
contains null
elements.public AppendedRowsTable(String suffix, DataTable... tables)
suffix
argument is null
) or may be avoided
by appending a fixed suffix to any subsequent occurence of a duplicate.
tables
- all tables to be appendedsuffix
- suffix to append to duplicate keys or null
to skip them
NullPointerException
- if argument is null
or
contains null
elements
IllegalArgumentException
- if suffix is empty (null
is ok)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
public AppendedRowsIterator iterator(ExecutionMonitor exec, int totalRowCount)
RowIterator.next()
method may throw an
exception if the execution is canceled. In particular if you try to
concatenate a table to itself and do not allow duplicates, the
RowIterator.next()
method runs very long (scanning the
entire table to just figure out that there are only duplicates).
exec
- the execution monitor for cancel / progresstotalRowCount
- the total number rows or negative if unknown
AppendedRowsIterator.RuntimeCanceledExecutionException
public static final DataTableSpec generateDataTableSpec(DataTableSpec... tableSpecs)
DataTableSpec
given the
tables.
tableSpecs
- the table specs as in the constructor
AppendedRowsTable(DataTable[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |