|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.data.sort.SortedTable
public class SortedTable
A data table that sorts a given data table according to the passed sorting parameters.
Constructor Summary | |
---|---|
SortedTable(BufferedDataTable dataTable,
Comparator<DataRow> rowComparator,
boolean sortInMemory,
ExecutionContext exec)
Creates a new sorted table. |
|
SortedTable(BufferedDataTable dataTable,
List<String> inclList,
boolean[] sortAscending,
boolean sortInMemory,
ExecutionContext exec)
Creates a sorted table from the given table and the sorting parameters. |
|
SortedTable(BufferedDataTable dataTable,
List<String> inclList,
boolean[] sortAscending,
ExecutionContext exec)
Creates a sorted table from the given table and the sorting parameters. |
Method Summary | |
---|---|
BufferedDataTable |
getBufferedDataTable()
|
DataTableSpec |
getDataTableSpec()
Returns the DataTableSpec object of this table which gives
information about the structure of this data table. |
int |
getRowCount()
|
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 SortedTable(BufferedDataTable dataTable, Comparator<DataRow> rowComparator, boolean sortInMemory, ExecutionContext exec) throws CanceledExecutionException
dataTable
- any data tablerowComparator
- the comparator that should be used for sortingsortInMemory
- true
if sorting should be done in
memory, false
if sorting should be done on diskexec
- an execution context for reporting progress and creating
temporary table files
CanceledExecutionException
- if the user canceled executionpublic SortedTable(BufferedDataTable dataTable, List<String> inclList, boolean[] sortAscending, ExecutionContext exec) throws CanceledExecutionException
dataTable
- the buffered data table to sortinclList
- the list with the columns to sort; the first column name
represents the first sort criteria, the second the second
criteria and so on.sortAscending
- the sort order; each field corresponds to the column
in the list of included columns. true: ascending false:
descendingexec
- the execution context used to create the the buffered data
table and indicate the progress
CanceledExecutionException
- the user has canceled this operationpublic SortedTable(BufferedDataTable dataTable, List<String> inclList, boolean[] sortAscending, boolean sortInMemory, ExecutionContext exec) throws CanceledExecutionException
dataTable
- the buffered data table to sortinclList
- the list with the columns to sort; the first column name
represents the first sort criteria, the second the second
criteria and so on.sortAscending
- the sort order; each field corresponds to the column
in the list of included columns. true: ascending false:
descendingsortInMemory
- true
if the table should be sorted in
memory, false
if it should be sorted in disk.
Sorting in memory is much faster but may fail if the data
table is too big.exec
- the execution context used to create the the buffered data
table and indicate the progress
CanceledExecutionException
- the user has canceled this operationMethod 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 BufferedDataTable getBufferedDataTable()
public int getRowCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |