Measurement<T extends Measurement<T>> class

Base class used by types that represent forms of measurement.

This class provides all Measurement subclasses with a collection of arithmetic and comparison operators.

See also: Length, for measurements of length. Mass, for measurements of weight.

Implemented types
Implementers

Constructors

Measurement(double _baseValue)
const

Properties

hashCode int
The hash code for this object. [...]
read-only, override
isNegative bool
Returns whether this Measurement is negative.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

abs() → T
Returns a new object of T representing the absolute value of this Measurement. [...]
compareTo(T other) int
Compares this Measurement to other, returning zero if the values are equal. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator *(double other) → T
Multiples this Measurement by other and returns the result as a new object of T.
operator +(T other) → T
Adds this Measurement and other and returns the sum as a new object of T.
operator -(T other) → T
Subtracts other from this Measurement and returns the difference as a new object of T.
operator /(double other) → T
Divides this Measurement by other and returns the result as a new object of T.
operator <(T other) bool
Returns true if the value of this Measurement is less than the value of other.
operator <=(T other) bool
Returns true if the value of this Measurement is less than or equal to the value of other.
operator ==(dynamic other) bool
Returns true if this Measurement has the same value as other.
override
operator >(T other) bool
Returns true if the value of this Measurement is greater than the value of other.
operator >=(T other) bool
Returns true if the value of this Measurement is greater than or equal to the value of other.
operator unary-() → T
Returns a new object of T representing this Measurement negated. [...]