Class CSVReader.CSVIterator

java.lang.Object
yearreview.app.util.csv.CSVReader.CSVIterator
All Implemented Interfaces:
Iterator<List<String>>
Enclosing class:
CSVReader

static class CSVReader.CSVIterator extends Object implements Iterator<List<String>>
An Iterator for the Rows of a CSV loading the Data right from a BufferedReader.
  • Field Details

    • br

      private final BufferedReader br
      Reader used to read in the CSV-file.
    • finished

      private boolean finished
      Whether the Iterator has come to the end of the file.
  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
      Tests whether the Iterator still has rows left.
      Specified by:
      hasNext in interface Iterator<List<String>>
      Returns:
      true if there are still rows to be read
    • next

      public List<String> next()
      Gets a row from the CSV-file.
      Specified by:
      next in interface Iterator<List<String>>
      Returns:
      Comma-Seperated values read into a list