RowSelection

com.phasmidsoftware.tableparser.core.table.RowSelection
See theRowSelection companion object
case class RowSelection(spans: Seq[Span]) extends CsvFragment

A selection of rows (e.g. "row=5-7;10").

Value parameters

spans

the specifications.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait CsvFragment
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def select[X](xs: Iterator[X], headerLines: Int): Iterator[X]

Method to select, lazily, the rows of an Iterator of the rows of a CSV file which follow its header lines. Only if a specification starts with "*" (the last row) must all the rows be read before any is selected; otherwise, the iterator is read only as far as the last row which could be selected.

Method to select, lazily, the rows of an Iterator of the rows of a CSV file which follow its header lines. Only if a specification starts with "*" (the last row) must all the rows be read before any is selected; otherwise, the iterator is read only as far as the last row which could be selected.

Type parameters

X

the row type.

Value parameters

headerLines

the number of header lines (the first of xs is row headerLines + 1).

xs

the rows, in order (the first follows the header lines).

Attributes

Returns

an Iterator of the selected rows, in order (each once, even if more than one specification selects it).

def select[X](table: Table[X]): Table[X]

Method to select the rows of a Table. The header is kept: its lines count as the first rows (so, for a table with a one-line header, row 2 is its first row).

Method to select the rows of a Table. The header is kept: its lines count as the first rows (so, for a table with a one-line header, row 2 is its first row).

Type parameters

X

the row type.

Value parameters

table

the table.

Attributes

Returns

a Table of the selected rows.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product