Byte.Opaque.Data

object Data
Source
__.scala
class java.lang.Object
trait scala.Matchable
class Any

Member

trait _methods extends _methods

Default methods for all Byte.Opaque.Data defined types

Source
__.scala
abstract class Calculable[A <: Byte.Opaque](name: String) extends Byte.Opaque.Data.Ordered[A] with _methods

Byte 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
abstract class Calculable[A <: Byte.Opaque](name: String) extends Byte.Opaque.Data.Ordered[A] with _methods

Byte 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
abstract class Numerical[A <: Byte.Opaque](name: String) extends Byte.Opaque.Data.Ordered[A] with _methods

Byte Opaque Numerical Data Companion Object Base

Opaque Numerical Data element is provided with similar operations, which are available on base primitive without any loss of performance.

See more in the guide.

See sample type definition.

Source
Numerical.scala
abstract class Numerical[A <: Byte.Opaque](name: String) extends Byte.Opaque.Data.Ordered[A] with _methods

Byte Opaque Numerical Data Companion Object Base

Opaque Numerical Data element is provided with similar operations, which are available on base primitive without any loss of performance.

See more in the guide.

See sample type definition.

Source
Numerical.scala
abstract class Ordered[A <: Byte.Opaque](name: String) extends Byte.Opaque.Data[A] with _methods

Byte Opaque Ordered Data Companion Object Base

Opaque Ordered Data element is provided with default ordering and can be compared with comparison operators.

See sample type definition.

Source
Ordered.scala
abstract class Ordered[A <: Byte.Opaque](name: String) extends Byte.Opaque.Data[A] with _methods

Byte Opaque Ordered Data Companion Object Base

Opaque Ordered Data element is provided with default ordering and can be compared with comparison operators.

See sample type definition.

Source
Ordered.scala