|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.RowIterator
public abstract class RowIterator
Classes extending this class iterate over the rows of a DataTable
.
Each DataTable has its specific RowIterator
, which returns
the rows one by one. A RowIterator
must return the rows always
in the same order.
Use RowIterators as follows:
DataTable table = ...; for (RowIterator it = table.getRowIterator(); it.hasNext();) { DataRow row = it.next(); ... }
or, if you don't need access to the iterator:
DataTable table =...; for (DataRow row : table) { // access the row here }
Note, the difference of this class to a generic Iterator<DataRow> is that it does not allow to remove elements.
DataRow
Constructor Summary | |
---|---|
RowIterator()
|
Method Summary | |
---|---|
abstract boolean |
hasNext()
Returns true if there are more rows and false
otherwise. |
abstract DataRow |
next()
Returns the next DataRow . |
void |
remove()
NOT supported by the DataTable iterator! DataTables are immutable read-only objects after their creation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RowIterator()
Method Detail |
---|
public abstract boolean hasNext()
true
if there are more rows and false
otherwise.
hasNext
in interface Iterator<DataRow>
true
if the iterator has more elements, otherwise
false
next()
public abstract DataRow next()
DataRow
.
next
in interface Iterator<DataRow>
DataTable
NoSuchElementException
- if there are no more rowspublic final void remove()
remove
in interface Iterator<DataRow>
UnsupportedOperationException
- if the remove
operation is not supported by this Iterator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |