QuantityRange<Q extends Quantity> class

Represents a range of quantity values.

Implementers

Constructors

QuantityRange(Q q1, Q q2)
Constructs a quantity range, from q1 to q2.

Properties

centerValue → Q
The value at the center of the range.
no setter
delta → Q
The change in value from start to end, which may be negative.
no setter
hashCode int
Two equal quantity ranges will have the same hash code.
no setteroverride
maxValue → Q
The maximum value in this range.
no setter
minValue → Q
The minimum value in this range.
no setter
q1 ↔ Q
The starting quantity of the range.
getter/setter pair
q2 ↔ Q
The ending quantity of the range.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
span → Q
The magnitude of the range. This value is always positive (or zero). Get delta for the signed version of the range.
no setter

Methods

contains(Q quantity, [bool inclusive = true, double epsilon = 1.0e-10]) bool
True if this range contains quantity, with a tolerance, epsilon, of rounding errors of 1.0e-10 and inclusive of the endpoints by default.
encompasses(QuantityRange<Q> range2) bool
True only if this range completely encompasses range2.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overlaps(QuantityRange<Q> range2) bool
Returns true if this range overlaps range2 (exclusive of the endpoints).
toString() String
Returns a String representation of this range in the form '
override

Operators

operator ==(Object obj) bool
Two quantity ranges are considered equal only if their endpoints are exactly equal.
override