Range<T extends Comparable<Object?> > class
sealed
A Range represents a convex (contiguous) portion of a domain.
T
is expected to be immutable. If T
is mutable, the value produced by Comparable.compare must not change when
used in a Range. Doing so will result in undefined behaviour.
See:
- Implementers
Properties
Methods
-
besides(
Range< T> other) → bool -
Returns
true
if an empty range exists between this andother
. -
contains(
T value) → bool -
Returns
true
if this containsvalue
. -
containsAll(
Iterable< T> values) → bool -
Returns
true
if this contains allvalues
. -
encloses(
Range< T> other) → bool -
Returns
true
ifother
's bounds do not extend outside this bounds. -
gap(
Range< T> other) → Interval<T> ? -
If this does not intersect
other
, returns the gap in between. Otherwise returnsnull
. -
intersection(
Range< T> other) → Range<T> ? -
If this intersects
other
, returns the intersection. Otherwise returnsnull
. -
intersects(
Range< T> other) → bool -
Returns
true
if a non-empty range exists between this andother
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited