CsvHeaderRow

data class CsvHeaderRow(columns: List<CsvColumn>) : List<CsvColumn>

Represents the header row of a CSV file, containing column definitions.

Constructors

Link copied to clipboard
constructor(columns: List<CsvColumn>)

Creates a header row from a list of CsvColumns.

Properties

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard

Returns the CsvColumn at the given index, or null if out of bounds.

Link copied to clipboard

Returns the CsvColumn with the given name, or null if not found.

Link copied to clipboard
open operator override fun contains(element: CsvColumn): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<CsvColumn>): Boolean
Link copied to clipboard
open operator override fun get(index: Int): CsvColumn
Link copied to clipboard
operator fun CsvDataRow.get(column: CsvColumn): String

Same as getOrEmpty

Link copied to clipboard
inline fun CsvDataRow.getOrElse(column: CsvColumn, defaultValue: (CsvColumn) -> String): String

Returns the value from this row for the given column, or computes a default value if not present.

Link copied to clipboard

Returns the value from this row for the given column, or an empty string if not present.

Link copied to clipboard

Returns the value from this row for the given column, or null if the index is out of bounds.

Link copied to clipboard
open override fun indexOf(element: CsvColumn): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<CsvColumn>
Link copied to clipboard
open override fun lastIndexOf(element: CsvColumn): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<CsvColumn>
open override fun listIterator(index: Int): ListIterator<CsvColumn>
Link copied to clipboard
inline fun CsvDataRow.mapValueOf(column: CsvColumn, transform: (String) -> String): List<String>

Applies transform to the value at the given column, returning a new list with the transformed value.

Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<CsvColumn>