StringsParser

com.phasmidsoftware.tableparser.core.parse.StringsParser
trait StringsParser[Row] extends RowParser[Row, Strings]

Trait to describe a parser which will yield a Try[Row] from a sequence of Strings representing a row of a table.

Type parameters

Row

the (parametric) Row type for which there must be evidence of a CellParser[Row].

Attributes

Graph
Supertypes
trait RowParser[Row, Strings]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Inherited and Abstract methods

def parse(header: Header)(input: Strings): Try[Row]

Parses the given input using the provided header and produces a result wrapped in a Try.

Parses the given input using the provided header and produces a result wrapped in a Try.

Value parameters

header

the header object that defines the schema or metadata for parsing the row.

input

the input of type Input to be parsed into a row of type Row.

Attributes

Returns

a Try[Row], where Success contains the parsed row if parsing succeeds, or Failure contains an exception if parsing fails.

Inherited from:
RowParser
def parseHeader(xs: Seq[Strings]): Try[Header]

Parse the Input, resulting in a Try[Header]

Parse the Input, resulting in a Try[Header]

CONSIDER making this share the same signature as parse but for different Row type.

Value parameters

xs

a sequence of Inputs to be parsed.

Attributes

Returns

a Try[Header]

Inherited from:
RowParser
def parseIndexed(header: Header)(indexedRow: (Strings, Int)): Try[Row]

Parses an indexed row, using the given header, into a Try[Row].

Parses an indexed row, using the given header, into a Try[Row].

Value parameters

header

the header which defines the schema or metadata for parsing the row.

indexedRow

a tuple containing the input row (of type Input) and its index (of type Int).

Attributes

Returns

a Try[Row] which will be a Success containing the parsed row if parsing is successful, or a Failure with an exception if parsing fails.

Inherited from:
RowParser