DerivedMeasurement<A extends Measurement<A> , B extends Measurement<B> > class
A measurement representing two simpler measurements tied together by either multiplication or division.
For example, velocity can be modeled as Distance / Time and Area can be modeled as Distance * Distance.
- Inheritance
-
- Object
- Measurement<
DerivedMeasurement< A, B> > - DerivedMeasurement
Constructors
- DerivedMeasurement.divide(A a, B b)
- Constructs a derived measurement representing the division of a pair of simpler measurements.
- DerivedMeasurement.infinite()
-
The derived measurement of infinite magnitude.
const
- DerivedMeasurement.multiply(A a, B b)
- Constructs a derived measurement representing the multiplication of a pair of simpler measurements.
- DerivedMeasurement.negativeInfinite()
-
The derived measurement of negative infinite magnitude.
const
- DerivedMeasurement.zero()
-
The derived measurement of zero magnitude.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFinite → bool
-
Returns
true
if this measurement is finite.no setterinherited - isInfinite → bool
-
Returns
true
if this measurement is infinite (either positive or negative).no setterinherited - isNaN → bool
-
Returns
true
if this measurement cannot be expressed as a number.no setterinherited - isNegative → bool
-
Returns
true
if this measurement is negative.no setterinherited - precision → int
-
Returns the number of digits of precision this measurement has.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- si → double
-
The SI value this measurement is based on.
finalinherited
Methods
-
acceptVisitor(
MeasurementVisitor visitor) → void -
Accept a visitor object for double-dispatch.
override
-
as(
MeasurementInterpreter< A> a, MeasurementInterpreter<B> b) → double - Interprets this using specific units.
-
compareMagnitude(
DerivedMeasurement< A, B> other) → double -
Returns the difference in magnitude between this and another measurement.
inherited
-
compareTo(
DerivedMeasurement< A, B> other) → int -
Compares this object to another object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withPrecision(
Precision precision) → DerivedMeasurement< A, B> -
Creates an equivalent measurement with the specified precision.
inherited
Operators
-
operator *(
double multiplier) → DerivedMeasurement< A, B> -
Returns a measurement equivalent to a multiple of this.
inherited
-
operator +(
DerivedMeasurement< A, B> other) → DerivedMeasurement<A, B> -
Returns a measurement equivalent to the sum of two others.
inherited
-
operator -(
DerivedMeasurement< A, B> other) → DerivedMeasurement<A, B> -
Returns a measurement equivalent to the difference between two others.
inherited
-
operator /(
double divisor) → DerivedMeasurement< A, B> -
Returns a measurement equivalent to a fraction of this.
inherited
-
operator <(
DerivedMeasurement< A, B> other) → bool -
Returns
true
if this is less than the other measurement.inherited -
operator <=(
DerivedMeasurement< A, B> other) → bool -
Returns
true
if this is less than or equal to the other measurement.inherited -
operator ==(
dynamic other) → bool -
The equality operator.
inherited
-
operator >(
DerivedMeasurement< A, B> other) → bool -
Returns
true
if this is greater than the other measurement.inherited -
operator >=(
DerivedMeasurement< A, B> other) → bool -
Returns
true
if this is greater than or equal to the other measurement.inherited -
operator unary-(
) → DerivedMeasurement< A, B> -
Returns a measurement representing the opposite of this.
inherited
-
operator ~/(
DerivedMeasurement< A, B> other) → int -
Returns the truncating division result of this and another measurement.
inherited