InputMapper

com.phasmidsoftware.tableparser.core.parse.InputMapper
trait InputMapper[Input, Row] extends Input => Try[Row]

A trait that defines a contract for mapping an input of type Input to a row of type Row as a computation that can either succeed or fail, represented by Try[Row].

InputMapper is designed to abstract the process of parsing or transforming an input into a structured row representation, where the input may come from any external or internal source and the row represents a meaningful structured output.

NOTE this does not handle sequenced input. If you potentially need to handle sequenced input, use InputPreprocessor instead.

Type parameters

Input

the type of input that will be processed or parsed (e.g., raw data).

Row

the type of the resulting row produced by the mapping (e.g., structured data).

Attributes

Graph
Supertypes
trait Input => Try[Row]
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def andThen[A](g: Try[Row] => A): Input => A

Composes two instances of Function1 in a new Function1, with this function applied first.

Composes two instances of Function1 in a new Function1, with this function applied first.

Type parameters

A

the result type of function g

Value parameters

g

a function R => A

Attributes

Returns

a new function f such that f(x) == g(apply(x))

Inherited from:
Function1
def compose[A](g: A => Input): A => Try[Row]

Composes two instances of Function1 in a new Function1, with this function applied last.

Composes two instances of Function1 in a new Function1, with this function applied last.

Type parameters

A

the type to which function g can be applied

Value parameters

g

a function A => T1

Attributes

Returns

a new function f such that f(x) == apply(g(x))

Inherited from:
Function1
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
Function1 -> Any
Inherited from:
Function1

Inherited and Abstract methods

def apply(v1: Input): Try[Row]

Applies the body of this function to the argument.

Applies the body of this function to the argument.

Value parameters

v1

the function argument

Attributes

Returns

the result of function application.

Inherited from:
Function1