org.knime.core.data.def
Class DefaultCellIterator

java.lang.Object
  extended by org.knime.core.data.def.DefaultCellIterator
All Implemented Interfaces:
Iterator<DataCell>

public class DefaultCellIterator
extends Object
implements Iterator<DataCell>

Default implementation of an iterator over the DataCells of a DataRow. It uses the getNumCells() and getCell(int) methods of the underlying row to return the cells. Hence, it starts at the cell of the column with index 0 and then sequentially returns the cells up to the last cell (of the column with the highest index) in the row.

The iterator doesn't support removal of datacells, an invocation of the method remove() will end up with an exception.

Author:
wiswedel, University of Konstanz

Constructor Summary
DefaultCellIterator(DataRow row)
          Creates a new iterator over a given DataRow.
 
Method Summary
 boolean hasNext()
          
 DataCell next()
          
 void remove()
          Throws UnsupportedOperationException as removal of datacells from a row is not permitted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCellIterator

public DefaultCellIterator(DataRow row)
Creates a new iterator over a given DataRow.

Parameters:
row - The row to traverse.
Throws:
NullPointerException - If the argument is null.
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<DataCell>

next

public DataCell next()

Specified by:
next in interface Iterator<DataCell>

remove

public void remove()
Throws UnsupportedOperationException as removal of datacells from a row is not permitted.

Specified by:
remove in interface Iterator<DataCell>
See Also:
Iterator.remove()


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.