Package yearreview.app.util.csv
Class CSVReader.CSVIterator
java.lang.Object
yearreview.app.util.csv.CSVReader.CSVIterator
- Enclosing class:
- CSVReader
An
Iterator
for the Rows of a CSV loading the Data right from a BufferedReader
.-
Field Summary
Modifier and TypeFieldDescriptionprivate final BufferedReader
Reader used to read in the CSV-file.private boolean
Whether the Iterator has come to the end of the file. -
Constructor Summary
-
Method Summary
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
-
Field Details
-
br
Reader used to read in the CSV-file. -
finished
private boolean finishedWhether the Iterator has come to the end of the file.
-
-
Constructor Details
-
CSVIterator
CSVIterator(File f) throws FileNotFoundException Constructs a CSV-Iterator from a given File.- Parameters:
f
- file to iterate- Throws:
FileNotFoundException
- if the file was not found
-
-
Method Details
-
hasNext
public boolean hasNext()Tests whether the Iterator still has rows left. -
next
Gets a row from the CSV-file.
-