UnitConverter class abstract

Base class for unit converters.

Implementers

Constructors

UnitConverter()

Properties

hashCode → int
The hash code for this object.
no setterinherited
inverted → UnitConverter
The inverse converter.
no setter
isIdentity → bool
Whether this converter leaves values unchanged.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(num value) → UnitConverter
Composes this converter with an additive offset.
apply(num value) → num
Converts value to the reference unit.
composeWith(UnitConverter other) → UnitConverter
Composes this converter with other.
divide(num value) → UnitConverter
Composes this converter with the inverse of value.
multiply(num value) → UnitConverter
Composes this converter with a multiplicative factor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pow(int exp) → UnitConverter
Raises this converter to exp.
toString() → String
A string representation of this object.
inherited
undo(num value) → num
Applies the inverse converter to value.

Operators

operator *(UnitConverter other) → UnitConverter
Alias for composeWith.
operator /(UnitConverter other) → UnitConverter
Alias for composition using the inverse of other.
operator ==(Object other) → bool
The equality operator.
inherited