ParseableDouble

com.phasmidsoftware.gryphon.parse.Parseable.ParseableDouble
See theParseableDouble companion trait

An implicit object that provides an implementation of the Parseable typeclass for Double.

This allows strings to be parsed into Double values wherever an implicit Parseable[Double] instance is required, such as in parsing operations for graph edges or numerical data.

Attributes

Companion
trait
Graph
Supertypes
trait Parseable[Double]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

def message: String

A method that returns a string representation associated with this trait.

A method that returns a string representation associated with this trait.

Attributes

Returns

The string "Double".

Inherited from:
ParseableDouble
def none: Double

Returns a default value of type T.

Returns a default value of type T.

Attributes

Returns

the default value of type T, typically representing an "empty" or "none" state.

Inherited from:
ParseableDouble
def parse(input: String): Try[Double]

Parses a string input and attempts to convert it into an optional value of type Double.

Parses a string input and attempts to convert it into an optional value of type Double.

Value parameters

input

The string to be parsed into an object of type Double.

Attributes

Returns

An Option containing the parsed object of type Double if successful, or None if the parsing fails.

Inherited from:
ParseableDouble
def regex: Regex

A regular expression used to match numeric values in a string, including integers, floating-point numbers, and numbers with an optional leading or trailing zero.

A regular expression used to match numeric values in a string, including integers, floating-point numbers, and numbers with an optional leading or trailing zero.

Attributes

Returns

A Regex pattern that matches valid numeric representations, such as "42", "3.14", or ".5".

Inherited from:
ParseableDouble