Class HeadedCsvParser
- java.lang.Object
-
- com.xceptance.xlt.api.report.external.AbstractLineParser
-
- com.xceptance.xlt.api.report.external.SimpleCsvParser
-
- com.xceptance.xlt.api.report.external.HeadedCsvParser
-
public class HeadedCsvParser extends SimpleCsvParser
Parses lines of a CSV file. Addresses columns by their column headline. It is assumed that the first line in file is the head-line. For any values to be parsed theAbstractLineParser.setValueNames(java.util.Set)
has to be called with the names of the columns which should be parsed (the time is stored in an extra field, so you do not have to give it as value name. The time column has to be the first one in the csv file).
-
-
Constructor Summary
Constructors Constructor Description HeadedCsvParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getName(int i)
Returns the name of the i-th column.ValueSet
parse(java.lang.String line)
Parse the resource line.-
Methods inherited from class com.xceptance.xlt.api.report.external.SimpleCsvParser
getFieldSeparator
-
Methods inherited from class com.xceptance.xlt.api.report.external.AbstractLineParser
getDateFormat, getProperties, getValueNames, parseTime, setProperties, setValueNames
-
-
-
-
Method Detail
-
parse
public ValueSet parse(java.lang.String line)
Parse the resource line.- Overrides:
parse
in classSimpleCsvParser
- Parameters:
line
- line to parse- Returns:
- parsed
ValueSet
ornull
if there is currently nothing to return. This might be in case the line has no value of interest.
-
getName
protected java.lang.String getName(int i)
Returns the name of the i-th column.- Overrides:
getName
in classSimpleCsvParser
- Parameters:
i
- the column index- Returns:
- the column's name
-
-