org.knime.base.node.io.arffreader
Class ARFFRowIterator
java.lang.Object
org.knime.core.data.RowIterator
org.knime.base.node.io.arffreader.ARFFRowIterator
- All Implemented Interfaces:
- Iterator<DataRow>
public class ARFFRowIterator
- extends RowIterator
- Author:
- Peter Ohl, University of Konstanz
Method Summary |
boolean |
hasNext()
Returns true if there are more rows and false
otherwise. |
DataRow |
next()
Returns the next DataRow . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ARFFRowIterator
public ARFFRowIterator(URL fileLocation,
DataTableSpec tSpec,
String rowKeyPrefix)
throws IOException
- Create a new row iterator reading the rows from an ARFF file at the
specified location.
- Parameters:
fileLocation
- valid URL of the file to readtSpec
- the structure of the table to createrowKeyPrefix
- row keys are constructed like rowKeyPrefix + lineNo
- Throws:
IOException
- if the ARFF file location couldn't be opened
hasNext
public boolean hasNext()
- Returns
true
if there are more rows and false
otherwise.
- Specified by:
hasNext
in interface Iterator<DataRow>
- Specified by:
hasNext
in class RowIterator
- Returns:
true
if the iterator has more elements, otherwise
false
- See Also:
RowIterator.next()
next
public DataRow next()
- Returns the next
DataRow
.
- Specified by:
next
in interface Iterator<DataRow>
- Specified by:
next
in class RowIterator
- Returns:
- the next row in the
DataTable
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.