|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.def.DefaultTable
DataContainer (or in
a Node's execute method a
BufferedDataTable to create
DataTables).
public class DefaultTable
Deprecated(!) default implementation of a DataTable object. This
implementation keeps the data in memory all the time. Don't use it. We have
better containers: rather use the
DataContainer.
| Constructor Summary | |
|---|---|
DefaultTable(DataRow[] rows,
DataTableSpec spec)
Deprecated. Creates a new table object from an array of DataRow
objects, and an array of column names and types. |
|
DefaultTable(DataRow[] rows,
String[] columnNames,
DataType[] columnTypes)
Deprecated. Creates a new table object from an array of DataRow
objects, and an array of column names and types. |
|
DefaultTable(double[][] data)
Deprecated. Calls this(data, (String[])null, (String[])null);. |
|
DefaultTable(double[][] data,
String[] rowHeader,
String[] colHeader)
Deprecated. Generates a new instance from an double[][] using the
default DataCell factory. |
|
DefaultTable(int[][] data)
Deprecated. Calls this(data, (String[])null, (String[])null);. |
|
DefaultTable(int[][] data,
String[] rowHeader,
String[] colHeader)
Deprecated. Generates a new instance from an int[][] using the default
DataCell factory. |
|
DefaultTable(Object[][] data)
Deprecated. Calls this(data, (String[])null, (String[])null);. |
|
DefaultTable(Object[][] data,
String[] rowHeader,
String[] colHeader)
Deprecated. Generates a new instance from an Object[][] using the
default DataCell factory. |
|
DefaultTable(Object[][] data,
String[] rowHeader,
String[] colHeader,
ObjectToDataCellConverter conv)
Deprecated. Generates a new instance from an Object[][]. |
|
| Method Summary | |
|---|---|
DataTableSpec |
getDataTableSpec()
Deprecated. Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
int |
getRowCount()
Deprecated. Get the number of rows in this table. |
protected List<DataRow> |
getRowsInList()
Deprecated. Get a reference to underlying data container. |
RowIterator |
iterator()
Deprecated. 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 DefaultTable(DataRow[] rows,
DataTableSpec spec)
DataRow
objects, and an array of column names and types.
rows - The list of DataRow objects.spec - The Spec of this table.
NullPointerException - If one of the arguments is
null, or if the array contains
null values.
IllegalArgumentException - If any runtime class in the row's cells
does not comply with the settings in the spec.
public DefaultTable(DataRow[] rows,
String[] columnNames,
DataType[] columnTypes)
DataRow
objects, and an array of column names and types.
rows - The list of DataRow objects.columnNames - The names of the columns.columnTypes - The column types.
NullPointerException - If one of the arguments is
null, or if any array contains
null values.
IllegalStateException - If redundant column names are found.
IllegalArgumentException - If any element in
columnTypes is not a (sub-)class of
DataCell.class or the runtime class for an
element of the corresponding cells in rows is
a supertype of its columnTypes counterpart.
public DefaultTable(Object[][] data,
String[] rowHeader,
String[] colHeader,
ObjectToDataCellConverter conv)
Object[][]. The data is
provided in a parameter array containing Objects that are
known by the given converter's
createDataCell(Object) method. The column type is
determined by the most specific DataCell class for all
cells in a column.
data - Content of the table, all rows must have same length,
null values are ok to indicate missing values.rowHeader - The name of the rows in an array. May be
null. The length of the array (if given) must
match data.length.colHeader - The name of the columns in an array. May be
null. The length of the array (if given) must
match data[r].length for any given
r.conv - Used to transform any object in data to a
DataCell
IllegalArgumentException - In the following cases:
data is null
data.length !=
rowHeader.length if rowHeader
is given (non-null)
colHeader (if not
null) is unequal to the length of any row in
data
data cannot be handled
by converter.
DataType.getCommonSuperType(DataType, DataType)
public DefaultTable(Object[][] data,
String[] rowHeader,
String[] colHeader)
Object[][] using the
default DataCell factory. That is, data may
only contain objects of type String, Integer,
Byte, Double, Float or
null to identify missing values. See the factory
implementation, ObjectToDataCellConverter.createDataCell(Object),
for details. The column type is determined by the most specific
DataCell class for all cells in a column.
data - Content of the table, all rows must have same length,
null values are ok to indicate missing values.rowHeader - The name of the rows in an array. May be
null. The length of the array (if given) must
match data.length.colHeader - The name of the columns in an array. May be
null. The length of the array (if given) must
match data[r].length for any given
r.
IllegalArgumentException - In the following cases:
data is null
data.length !=
rowHeader.length if rowHeader
is given (non-null)
colHeader (if not
null) is unequal to the length of any row in
data
data cannot be handled
by converter.
DataType.getCommonSuperType(DataType, DataType)public DefaultTable(Object[][] data)
this(data, (String[])null, (String[])null);.
data - Data to be set in this table. For further details see other
constructorDefaultTable(Object[][], String[], String[])
public DefaultTable(int[][] data,
String[] rowHeader,
String[] colHeader)
int[][] using the default
DataCell factory. All entries in this parameter array are
wrapped by an IntCell by calling
ObjectToDataCellConverter.createDataCell(new Integer(data[i][j])
data - Content of the table, all rows must have same length.rowHeader - The name of the rows in an array. May be
null. The length of the array (if given) must
match data.length.colHeader - The name of the columns in an array. May be
null. The length of the array (if given) must
match data[r].length for any given
r.
IllegalArgumentException - In the following cases:
data is null
data.length !=
rowHeader.length if rowHeader
is given (non-null)
colHeader (if not
null) is unequal to the length of any row in
data
data cannot be handled
by converter.
ObjectToDataCellConverter.createDataCell(Object)public DefaultTable(int[][] data)
this(data, (String[])null, (String[])null);.
data - Data to be set in this table. For further details see other
constructorDefaultTable(int[][], String[], String[])
public DefaultTable(double[][] data,
String[] rowHeader,
String[] colHeader)
double[][] using the
default DataCell factory. All entries in this parameter
array are wrapped by an DoubleCell by calling
ObjectToDataCellConverter.createDataCell(new Double(data[i][j])
data - Content of the table, all rows must have same length.rowHeader - The name of the rows in an array. May be
null. The length of the array (if given) must
match data.length.colHeader - The name of the columns in an array. May be
null. The length of the array (if given) must
match data[r].length for any given
r.
IllegalArgumentException - In the following cases:
data is null
data.length !=
rowHeader.length if rowHeader
is given (non-null)
colHeader (if not
null) is unequal to the length of any row in
data
data cannot be handled
by converter.
public DefaultTable(double[][] data)
this(data, (String[])null, (String[])null);.
data - Data to be set in this table. For further details see other
constructorDefaultTable(double[][], String[], String[])| Method Detail |
|---|
public DataTableSpec getDataTableSpec()
DataTableSpec object of this table which gives
information about the structure of this data table.
getDataTableSpec in interface DataTablepublic RowIterator iterator()
iterator in interface Iterable<DataRow>iterator in interface DataTableDataRowprotected final List<DataRow> getRowsInList()
ArrayList contains objects of type DataRow.
This method never returns null, even though the returned
list can be empty if there are no rows in the table.
public int getRowCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||