Measure<D extends Dimension> class
Represents a value associated with a unit.
- Implemented types
-
- Comparable<
Measure< D> >
- Comparable<
Properties
- dim → Dimension
-
Alias for
unit.dim.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
-
inverted
→ Measure<
Dimension> -
Inverse measure.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
unit
→ Unit<
D> -
Unit of this value.
final
- val → num
-
Numeric value.
final
Methods
-
apply(
num f(num v)) → Measure< D> -
Returns a copy with
fapplied to the numeric value. -
cast<
T extends Dimension> (T dim) → Measure< T> -
Casts this measure to
dim. -
compareTo(
Measure< D> other) → int -
Compares this measure with
other.override -
divide(
num num) → Measure< D> -
Divides this measure by
num. -
format(
[MeasureFormat? format]) → String -
Formats this measure using
formator the dimension default format. -
isCompatible(
Measure< D> other) → bool -
Whether this measure is compatible with
other. -
multiply(
num num) → Measure< D> -
Multiplies this measure by
num. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of(
Unit< D> unit) → bool -
Whether this measure is expressed in
unit. -
pow(
int p) → Measure< Dimension> -
Returns this measure raised to
p. -
split(
Set< Unit< units) → Map<D> >Unit< D> , num> - Splits this measure into the provided compatible units.
-
to(
Unit< D> other) → Measure<D> -
Converts this measure to
other. -
toString(
) → String -
Returns format.
override
Operators
-
operator %(
num other) → num -
operator *(
Measure< Dimension> other) → Measure<Dimension> -
operator +(
Measure< Dimension> other) → Measure<D> -
operator -(
Measure< Dimension> other) → Measure<D> -
operator /(
Measure< Dimension> other) → Measure<Dimension> -
operator <(
Measure< D> other) → bool -
operator <=(
Measure< D> other) → bool -
operator ==(
Object other) → bool -
Measures are equal when they are compatible and compare numerically equal.
override
-
operator >(
Measure< D> other) → bool -
operator >=(
Measure< D> other) → bool -
operator ~/(
num other) → Measure< D>