|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.collection.CollectionCellFactory
public final class CollectionCellFactory
Factory class used to create DataCell
s that contain a collection of
DataCell
s. Also provides convenient methods to determine the type of
the elements (the common super type), if no such collection cell is at hand.
Method Summary | |
---|---|
static ListCell |
createListCell(Collection<? extends DataCell> coll)
Factory method to create a ListCell based on a collection. |
static ListCell |
createListCell(DataRow row,
int[] cols)
Creates a new ListCell based on selected cells from a
DataRow . |
static SetCell |
createSetCell(Collection<? extends DataCell> coll)
Factory method to create a SetCell that contains a data cell set
based on a collection. |
static SetCell |
createSetCell(DataRow row,
int[] cols)
Create new SetCell containing a set based on selected cell from a
DataRow . |
static DataType |
getElementType(DataTableSpec tableSpec,
int[] cols)
Determines the super type of the specified columns. |
static DataType |
getElementType(DataType[] colType)
Determines the super type of all types passed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ListCell createListCell(Collection<? extends DataCell> coll)
ListCell
based on a collection.
If the underlying collection stems from a DataRow
(as read from a
any table), consider to use createListCell(DataRow, int[])
in
order to minimize cell access.
coll
- The underlying collection.
ListCell
.
NullPointerException
- If the argument is null or contains null
values.public static ListCell createListCell(DataRow row, int[] cols)
ListCell
based on selected cells from a
DataRow
. Using this method will check if the row is returned by
a BufferedDataTable
and will handle blobs appropriately.
row
- The underlying rowcols
- The indices of interest.
ListCell
.
NullPointerException
- If either argument is null.
IndexOutOfBoundsException
- If the indices are invalid.public static SetCell createSetCell(Collection<? extends DataCell> coll)
SetCell
that contains a data cell set
based on a collection.
If the underlying collection stems from a DataRow
(as read from a
any table), consider to use createSetCell(DataRow, int[])
in
order to minimize cell access.
coll
- The underlying collection.
SetCell
.
NullPointerException
- If the argument is null or contains null
values.public static SetCell createSetCell(DataRow row, int[] cols)
SetCell
containing a set based on selected cell from a
DataRow
. Using this method will check if the row is returned by
a BufferedDataTable
and will handle blobs appropriately.
row
- The underlying rowcols
- The indices of cells to be stored in the set.
SetCell
.
NullPointerException
- If either argument is null.
IndexOutOfBoundsException
- If the indices are invalid.public static DataType getElementType(DataTableSpec tableSpec, int[] cols)
tableSpec
- containing the types of the selected columnscols
- the indices of the columns to determine the common super type
of
NullPointerException
- if either of the arguments is null
ArrayIndexOutOfBoundsException
- if the provided column indices are
invalid.public static DataType getElementType(DataType[] colType)
colType
- the types of which the common super type should be
returned.
NullPointerException
- if the array or one of its elements is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |