Interface CsvData


public interface CsvData
Represents immutable CSV data.
  • Method Details

    • getHeaders

      Optional<CsvHeaders> getHeaders()
      Returns the CsvHeaders for the data, if present. If not present, this returns an empty Optional.
      Returns:
      the CsvHeaders for the data if present; else an empty Optional.
    • getRow

      Row getRow(int index)
      Returns a Row of data at a given index.
      Parameters:
      index - the index of the row to retrieve. Cannot be negative or greater than/equal to the number of rows.
      Returns:
      a Row of data at the specified index
    • streamRows

      Stream<Row> streamRows()
      Returns a Stream of all Rows in the CSV data.
      Returns:
      a Stream of all Rows
    • getNumRows

      int getNumRows()
      Returns the total number of rows in the CSV data.
      Returns:
      the total number of rows
    • asString

      String asString()
      Returns the CSV as a String.
      Returns:
      the CSV as a String