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

# Class SimpleCsvParser

java.lang.Object
com.xceptance.xlt.api.report.external.AbstractLineParser
com.xceptance.xlt.api.report.external.SimpleCsvParser

Direct Known Subclasses:
  `HeadedCsvParser`

public class SimpleCsvParser extends AbstractLineParser
Parses lines of a CSV file. Addresses columns by their column index number. Requires unique column names.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleCsvParser()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected char`
  `getFieldSeparator()`
  Returns the configured CSV field separator character.
  `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.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

  - ### SimpleCsvParser

    public SimpleCsvParser()

- ## Method Details

  - ### parse

    public ValueSet parse(String line)
    Parse the resource line.
    Specified by:
      `parse` in class `AbstractLineParser`
    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.
    Parameters:
      `i` - the column index
    Returns:
      the column's name

  - ### getFieldSeparator

    protected char getFieldSeparator()
    Returns the configured CSV field separator character. By default it is a comma.
    Returns:
      field separator