Convertible

com.phasmidsoftware.number.algebra.core.Convertible
trait Convertible[T, U]

The typeclass Convertible represents a generic abstraction for transforming an instance of type U into type T by applying a specific operation defined by the convert method.

Type parameters

T

the target type to which an instance of type U can be converted

U

the source type that can be transformed into type T

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def convert(t: T, u: U): T

Transforms an instance of type U into type T by applying a specific operation, optionally using an additional parameter of type T.

Transforms an instance of type U into type T by applying a specific operation, optionally using an additional parameter of type T.

Value parameters

t

a template object of type T that might assist in the conversion

u

the source object of type U to be converted

Attributes

Returns

the converted object of type T