StandardStringsParser

com.phasmidsoftware.tableparser.core.parse.StandardStringsParser
case class StandardStringsParser[Row]()(using evidence$1: CellParser[Row]) extends StringsParser[Row]

StandardRowParser: a parser which extends RowParser[Row] and will yield a Try[Row] from a String representing a line of a table.

Type parameters

Row

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

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait StringsParser[Row]
trait RowParser[Row, Strings]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete 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.

def parseHeader(ws: Seq[Strings]): Try[Header]

Method to parse a sequence of Strings as a Try[Header].

Method to parse a sequence of Strings as a Try[Header].

Value parameters

ws

the header row as a sequence of Strings.

Attributes

Returns

a Try[Header].

def parseIndexed(header: Header)(indexedString: (Strings, Int)): Try[Row]

Parses a given indexed String (row data and its index) using the specified table header to produce a Try[Row].

Parses a given indexed String (row data and its index) using the specified table header to produce a Try[Row].

Value parameters

header

the table Header object providing metadata about the row's structure (e.g., column names).

indexedString

a tuple where the first element is the sequence of Strings representing the row data, and the second element is the index of the row in the table.

Attributes

Returns

a Try[Row], which is a Row object if parsing is successful, or a failure if parsing encounters an error.

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