ParseableOption

com.phasmidsoftware.tableparser.core.parse.ParseableOption
See theParseableOption companion object
abstract class ParseableOption[T] extends Parseable[Option[T]]

Abstract class to parse optional scala values.

Type parameters

T

the resulting type for which there must be evidence of a Parseable[T].

Attributes

Companion
object
Graph
Supertypes
trait Parseable[Option[T]]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

def parse(s: String, optModifier: Option[String]): Try[Option[T]]

Parses a given string into an optional value of type T, handling blank input as None.

Parses a given string into an optional value of type T, handling blank input as None.

This method utilizes an implicit Parseable[T] to parse the input string. If the string is deemed blank (causing a BlankException), the result will be a Success(None). Otherwise, it will attempt to parse the string into a value of type T and wrap the result in an Option.

Value parameters

optModifier

an optional modifier that may influence parsing behavior.

s

the input string to be parsed.

Attributes

Returns

a Try containing an optional value of type T if parsing succeeds, or an error if parsing fails for other exceptions.