Class CSVReader
Object
CSVReader
This reader was implemented in practical 4, feel free to use that version.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CSVReader
Basic overloaded constructor that assumes the first line should be skipped.- Parameters:
file
- name of file to read
-
CSVReader
A constructor that requires the name of the file to open- Parameters:
file
- filename to readskipHeader
- true to skip header, false if it is to be read
-
-
Method Details
-
getNext
Reads a line (nextLine()) and splits it into a String array by the DELIMINATOR, if the line is empty it will also return null.- Returns:
- a String List if a line exits or null if not
-
hasNext
public boolean hasNext()Checks to see if the fileScanner has more lines and returns the answer.- Returns:
- true if the file scanner has more lines (hasNext())
-