Companion object for the Literal class, providing factory methods and pattern matching support.
Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The names of the product elements.
Attributes
- Inherited from:
- Mirror
The name of the type.
The name of the type.
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
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
Literalcontaining theWholeNumberrepresentation 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
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
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
Valuableinstance to be wrapped within an optionalLiteral.
Attributes
- Returns
-
an
Option[Literal]containing the createdLiteralif successful, orNoneotherwise.
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.