public class CSVReader extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DELIM
Comma delimiter for a .CSV formatted output file.
|
static String |
QUOTE
Quote delimiter for a .CSV formatted output file.
|
Modifier and Type | Method and Description |
---|---|
static List<List<String>> |
parseCSV(File csvFile)
Reads an entry for each entry in the .CSV file and validates the file
as a valid .CSV file.
|
static List<String> |
readRows(File csvFile)
Reads a string for each row in the .CSV file and validates the file
as a valid .CSV file.
|
static void |
validate2DTables(List<List<String>> dataA,
List<List<String>> dataB)
Ensures that the data is non-null, the data has the same size,
and each inner list has the same size in both datasets.
|
static void |
validate2DTablesNames(File csvA,
File csvB)
Ensures that each file name contains three components as delimited
by the "-" character.
|
public static final String QUOTE
public static final String DELIM
public static List<String> readRows(File csvFile)
csvFile
- .CSV file to read frompublic static List<List<String>> parseCSV(File csvFile)
csvFile
- .CSV file to read frompublic static void validate2DTablesNames(File csvA, File csvB)
Throws an illegal argument exception if the graph type and component sizes are incorrect.
csvA
- file A corresponding to one Table2D output filecsvB
- file B corresponding to one Table2D output filepublic static void validate2DTables(List<List<String>> dataA, List<List<String>> dataB)
Throws an illegal argument exception if these conditions are not met.
dataA
- one set of CSV entriesdataB
- another set of CSV entriesCopyright © 2015. All rights reserved.