TableParser

com.phasmidsoftware.tableparser.core.parse.TableParser
See theTableParser companion trait
object TableParser

The TableParser object provides functionality for parsing tabular data from various sources using a StringTableParser. It includes utilities for character-by-character parsing of sources, working with sampled data, and handling parsing results effectively. The object also provides implicit and utility functions to enhance parsing workflows.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def sampler[X](n: Int): Try[X] => Boolean

Method to return a random sampling function.

Method to return a random sampling function.

CONSIDER using FP.sampler

Type parameters

X

the underlying type of the sampler.

Value parameters

n

this is the sample factor: approximately one in every n successful results will form part of the result.

Attributes

Returns

a Try[X] => Boolean function which is always yields false if its input is a failure, otherwise, it chooses every nth value (approximately).

Concrete fields

val includeAll: Try[Any] => Boolean

a function which always evaluates as true, regardless of the successfulness of the input.

a function which always evaluates as true, regardless of the successfulness of the input.

Attributes

val logger: Logger
val r: Random

Extensions

Extensions

extension [Table](p: StringTableParser[Table])
infix def parse(sy: Try[Source]): Try[Table]

Method to parse a Try[Source] character-by-character. NOTE the underlying source of sy will be closed after parsing has been completed.

Method to parse a Try[Source] character-by-character. NOTE the underlying source of sy will be closed after parsing has been completed.

Value parameters

sy

a Try[Source].

Attributes

Returns

a Try[Table].