Dimension

trait Dimension[A <: Quantity[A]]

Represents a Dimension or Quantity Type

Represents a Dimension or Quantity Type

This trait should be mixed into the Companion Objects of specific Quantity Types.

Type Params
A

Quantity Type

class Object
trait Matchable
class Any

Value members

Abstract methods

def name: String

The name

The name

The unit with a conversions factor of 1. The conversionFactor for other units should be set relative to this unit.

The unit with a conversions factor of 1. The conversionFactor for other units should be set relative to this unit.

The International System of Units (SI) Base Unit

The International System of Units (SI) Base Unit

def units: Set[UnitOfMeasure[A]]

Set of available units

Set of available units

Concrete methods

override def equals(that: Any): Boolean
Definition Classes
Any
override def hashCode(): Int
Definition Classes
Any
protected def parse(value: Any): Try[A]

Tries to map a string or tuple value to Quantity of this Dimension

Tries to map a string or tuple value to Quantity of this Dimension

Value Params
value

the source string (ie, "10 kW") or tuple (ie, (10, "kW"))

Returns

Try[A]

def parseString(s: String): Try[A]
def parseTuple[N](t: (N, String))(num: Numeric[N]): Try[A]
def symbolToUnit(symbol: String): Option[UnitOfMeasure[A]]

Maps a string representation of a unit symbol into the matching UnitOfMeasure object

Maps a string representation of a unit symbol into the matching UnitOfMeasure object

Value Params
symbol

String

Implicits

Implicits

implicit val dimensionImplicit: Dimension[A]