Class VerboseCSVMeasureOutputReader
java.lang.Object
dataAnalysis.measureOutputs.VerboseCSVMeasureOutputReader
- All Implemented Interfaces:
AutoCloseable
Reads a Verbose CSV measure output file, providing all the samples and weights.
- Author:
- Bertoli Marco 2014-09-14
-
Constructor Summary
ConstructorsConstructorDescriptionVerboseCSVMeasureOutputReader(File measureCsvFile, String logDecimalSeparator, String logCsvDelimiter) Builds a new CSV measure reader -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intReturns the line number.doubleReturns the percentage of file parseddoubleReturns the parsed sample.doubleReturns the parsed simulation time.doubleReturns the parsed weight.booleanTells if there are more lines in this file.voidopenFile(int initialLine) Opens the measure filebooleanreadLine()Reads a line from the verbose CSV
-
Constructor Details
-
VerboseCSVMeasureOutputReader
-
-
Method Details
-
openFile
Opens the measure file- Parameters:
initialLine- the initial line to read.- Throws:
IOException
-
hasMoreLines
Tells if there are more lines in this file.- Returns:
- true if there are more lines, false otherwise
- Throws:
IOException
-
readLine
Reads a line from the verbose CSV- Returns:
- true if more lines are available, false otherwise
- Throws:
IOException- when a data access error happensParseException- when data is not well formed
-
getLineNumber
public int getLineNumber()Returns the line number.- Returns:
- the last line number read
-
getParsedSample
public double getParsedSample()Returns the parsed sample.- Returns:
- the parsed sample
-
getParsedWeight
public double getParsedWeight()Returns the parsed weight.- Returns:
- the parsed weight
-
getParsedSimulationTime
public double getParsedSimulationTime()Returns the parsed simulation time.- Returns:
- the parsed simulation time
-
getParsedPercentage
Returns the percentage of file parsed- Returns:
- the percentage of file parsed
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-