Package com.helger.commons.csv
Class CSVIterator
- java.lang.Object
-
- com.helger.commons.csv.CSVIterator
-
- All Implemented Interfaces:
Iterator<ICommonsList<String>>
public class CSVIterator extends Object implements Iterator<ICommonsList<String>>
Provides an Iterator over the data found in opencsv.- Author:
- OpenCSV, Philip Helger
-
-
Constructor Summary
Constructors Constructor Description CSVIterator(CSVReader aReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Returnstrueif the iteration has more elements.ICommonsList<String>next()Returns the next element in the iterator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
CSVIterator
public CSVIterator(@Nonnull CSVReader aReader) throws IOException
- Parameters:
aReader- reader for the csv data. May not benull.- Throws:
IOException- if unable to read data from the reader.
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returnstrueif the iteration has more elements. In other words, returnstrueif next() would return an element rather than throwing an exception.- Specified by:
hasNextin interfaceIterator<ICommonsList<String>>- Returns:
trueif thisCSVIteratorhas more elements.
-
next
@Nonnull public ICommonsList<String> next()
Returns the next element in the iterator.- Specified by:
nextin interfaceIterator<ICommonsList<String>>- Returns:
- The next element of the iterator. Never
null.
-
-