ProductCellParser

com.phasmidsoftware.tableparser.core.parse.ProductCellParser
See theProductCellParser companion object
class ProductCellParser[T](typeName: String, fieldNames: List[String], fieldParsers: List[CellParser[_]], construct: Seq[Any] => T)(using helper: ColumnHelper[T]) extends MultiCellParser[T]

The CellParser of a case class T, as derived by CellParser.derived.

Type parameters

T

the type of the result.

Value parameters

construct

a function to construct a T from the values of its fields.

fieldNames

the names of the fields of T, in declaration order.

fieldParsers

the CellParsers of the fields of T, in the same order.

helper

the ColumnHelper[T] which maps field names to column names.

typeName

the name of T (used in error messages).

Attributes

Companion
object
Graph
Supertypes
trait MultiCellParser[T]
trait CellParser[T]
trait StringConverter[T]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def convertString(w: String): Try[T]

A case class with just one field can also be parsed from a single String (see issue #1).

A case class with just one field can also be parsed from a single String (see issue #1).

Attributes

Definition Classes
def parse(wo: Option[String], row: Row, columns: Header): Try[T]

Method to parse an Option[String] to a T.

Method to parse an Option[String] to a T.

Value parameters

columns

the column names. CONSIDER do we actually need the Header parameter here?

row

a Row of values.

wo

an optional String.

Attributes

Returns

a new instance of T.

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes

Inherited methods

def parse(value: Convertible): Try[T]

Parse a Convertible value into a T.

Parse a Convertible value into a T.

Value parameters

value

the Convertible value.

Attributes

Returns

a new instance of T wrapped in Try.

Inherited from:
CellParser