Scalar

com.phasmidsoftware.lascala.values.Scalar
See theScalar companion trait
object Scalar

Attributes

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

Members list

Value members

Concrete methods

def sequence[K](kWm: Map[K, Any])(implicit conv: ScalarMaker): Map[K, Scalar]

Transform a Map of Strings into a Map of corresponding Scalars.

Transform a Map of Strings into a Map of corresponding Scalars.

NOTE that there is no native Scalar which is a Map.

Type parameters

K

the key type

Value parameters

kWm

a map of Strings

Attributes

Returns

a map of Scalars

def tryScalar(x: Any): Try[Scalar]

Method to convert any of several types of object into a Scalar

Method to convert any of several types of object into a Scalar

Value parameters

x

an Any

Attributes

Returns

a Try[Scalar] where the value is the result of applying one of the several apply methods in this Scalar object.

def tryScalarTuple(k: String, x: Any): Try[(String, Scalar)]
def trySequence[K](kWm: Map[K, Any])(implicit conv: ScalarMaker): Try[Map[K, Scalar]]

Transform a Map of K,Any into a Map of corresponding K,Scalar

Transform a Map of K,Any into a Map of corresponding K,Scalar

Type parameters

K

the key type

Value parameters

kWm

a map of K,Any

Attributes

Returns

a map of Scalars

def unapply(x: Scalar): Option[Any]

Givens

Givens

given scalarRenderable: [S <: Scalar] => Renderable[S]

Renders any Scalar simply, obviously and elegantly, using renderFormatted with the value of defaultFormat. If you're interested in the Scalar wrapper type, use toString.

Renders any Scalar simply, obviously and elegantly, using renderFormatted with the value of defaultFormat. If you're interested in the Scalar wrapper type, use toString.

Attributes

Implicits

Implicits

implicit def apply(x: Boolean): Scalar
implicit def apply(x: Int): Scalar
implicit def apply(x: Double): Scalar
implicit def apply(x: LongRational): Scalar
implicit def apply(x: String): Scalar
implicit def apply(x: LocalDate): Scalar