Package com.xceptance.xlt.api.report.external

# 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 the `AbstractLineParser.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

  Modifier and Type
  Method
  Description
  `protected String`
  `getName(int i)`
  Returns the name of the i-th column.
  `ValueSet`
  `parse(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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HeadedCsvParser

    public HeadedCsvParser()

- ## Method Details

  - ### parse

    public ValueSet parse(String line)
    Parse the resource line.
    Overrides:
      `parse` in class `SimpleCsvParser`
    Parameters:
      `line` - line to parse
    Returns:
      parsed `ValueSet` or `null` if there is currently nothing to return. This might be in case the line has no value of interest.

  - ### getName

    protected String getName(int i)
    Returns the name of the i-th column.
    Overrides:
      `getName` in class `SimpleCsvParser`
    Parameters:
      `i` - the column index
    Returns:
      the column's name