Literal

com.phasmidsoftware.number.expression.expr.Literal
See theLiteral companion class
object Literal

Companion object for the Literal class, providing factory methods and pattern matching support.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Literal.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(x: Int): Literal

Converts the given integer value into a Literal object with a WholeNumber representation AND a name.

Converts the given integer value into a Literal object with a WholeNumber representation AND a name.

Value parameters

x

the integer value to be converted

Attributes

Returns

a Literal containing the WholeNumber representation of the input integer

Creates a Literal instance from a Rational value.

Creates a Literal instance from a Rational value.

Value parameters

x

the Rational value to be wrapped in a Literal

Attributes

Returns

a Literal instance containing the given Rational value encapsulated in a Real

def apply(x: Double): Literal

Creates a new Literal instance wrapping the given Double value.

Creates a new Literal instance wrapping the given Double value.

Value parameters

x

the Double value to be wrapped in the Literal.

Attributes

Returns

a Literal instance containing the provided Double value as a Real.

Creates a Literal instance from a given number.

Creates a Literal instance from a given number.

Value parameters

x

the number to convert into a Literal

Attributes

Returns

a Literal instance representing the given number

def someLiteral(x: Eager): Option[Literal]

Creates a Literal instance wrapping the provided Valuable object and associates it with a name.

Creates a Literal instance wrapping the provided Valuable object and associates it with a name.

Value parameters

x

the Valuable instance to be wrapped within an optional Literal.

Attributes

Returns

an Option[Literal] containing the created Literal if successful, or None otherwise.

def unapply(arg: Literal): Option[(Eager, Option[String])]

Extracts a Valuable value from a Literal instance. CONSIDER this may never be invoked.

Extracts a Valuable value from a Literal instance. CONSIDER this may never be invoked.

Value parameters

arg

the Literal instance to extract the Valuable from.

Attributes

Returns

an Option containing the extracted Valuable, or None if extraction is not possible.