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 Details

    • CSVIterator

      public CSVIterator(@Nonnull CSVReader aReader) throws IOException
      Parameters:
      aReader - reader for the csv data. May not be null.
      Throws:
      IOException - if unable to read data from the reader.
  • Method Details

    • hasNext

      public boolean hasNext()
      Returns true if the iteration has more elements. In other words, returns true if next() would return an element rather than throwing an exception.
      Specified by:
      hasNext in interface Iterator<ICommonsList<String>>
      Returns:
      true if this CSVIterator has more elements.
    • next

      @Nonnull public ICommonsList<String> next()
      Returns the next element in the iterator.
      Specified by:
      next in interface Iterator<ICommonsList<String>>
      Returns:
      The next element of the iterator. Never null.