Short.Opaque.Data.Calculable

abstract class Calculable[A <: Short.Opaque](name: String) extends Short.Opaque.Data.Ordered[A] with _methods

Short Opaque Calculable Data Companion Object Base

Opaque Calculable Data elements cannot be treated as numbers, but they support addition, subtraction with its own kind, and multiplication and division by primitives.

The best example of Data.Calculable type is Time.Length:

var tl : Time.Length = 1.Hour - 10.Minutes + 20.Seconds

tl.tp          // Prints: 50 mins 20 secs

(tl / 5).tp    // Prints: 10 mins 4 secs

(tl * 5).tp    // Prints: 4 hours 11 mins 40 secs

Stream operation "sum" is also valid for Data.Calculable

See sample type definition.

Source
Calculable.scala
trait _methods
class Short.Opaque.Data.Ordered[Short.Opaque.Data.Calculable.A]
trait _methods
class Short.Opaque.Data[Short.Opaque.Data.Calculable.A]
trait Short.G.Companion.Containers[Short.Opaque.Data.Calculable.A]
trait _methods
class Short.Opaque.Base[Short.Opaque.Data.Calculable.A]
trait Any.Def.Void.Primitive.X.Short[Short.Opaque.Data.Calculable.A]
trait Any.Def.Void.Primitive[Short.Opaque.Data.Calculable.A]
trait _methods
class Any.Z.OpaqueBase[Short.Opaque.Data.Calculable.A]
trait Any.Def.Void[Short.Opaque.Data.Calculable.A]
trait Any.Def.Doc[Short.Opaque.Data.Calculable.A]
trait Any.Def.Tag[Short.Opaque.Data.Calculable.A]
class Any.Def.TypeName[Short.Opaque.Data.Calculable.A]
class java.lang.Object
trait scala.Matchable
class Any

Def

@scala.annotation.threadUnsafe
final lazy val ordering: Ordering[A]
Inherited from
Ordered
Source
Ordered.scala
val typeName: String

Type name

Type name

Returns defined opaque type name

Inherited from
OpaqueBase
Source
OpaqueBase.scala
def value_doc(v: A): Doc

Value to Doc

Value to Doc

Override this method to provide type custom Doc implementation

Inherited from
Base
Source
Base.scala
def value_isVoid(v: A): Boolean

Void check

Void check

Override this method to define which instances of this type are void

By default this method always returns false

If type supports void instances, then following inmpelentation should be added in most cases:

 implicit inline def implicitRequest(v:VOID): OPAQUE_TYPE
Inherited from
Base
Source
Base.scala
def value_tag(v: A): String

Value to String

Value to String

Override this method to provide type custom convertion to String

Inherited from
Base
Source
Base.scala

Containers

Specialized buffer

Specialized buffer

Already parameterized generic buffer

Inherited from
Containers
Source
Containers.scala

Specialized collection

Specialized collection

Already parameterized generic collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized functions

Specialized functions

Already parameterized set of generic functions

Inherited from
Containers
Source
Containers.scala

Specialized indexed collection

Specialized indexed collection

Already parameterized generic indexed collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized lookup collection

Specialized lookup collection

Already parameterized generic lookup collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized option

Specialized option

Already parameterized generic option

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized pack

Specialized pack

Already parameterized generic immutable collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized property

Specialized property

Already parameterized generic property

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Parameterized Val.Promise

Parameterized Val.Promise

Already parameterized generic Val.Promise

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized range

Specialized range

Already parameterized generic range

Inherited from
Containers
Source
Containers.scala

Parameterized Val.Result

Parameterized Val.Result

Already parameterized generic Val.Result

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Type alias

Type alias

Inherited from
Containers
Source
Containers.scala

Companion alias

Companion alias

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized stream

Specialized stream

Already parameterized generic stream

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala