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
trueif an empty range exists between this andother. -
contains(
T value) → bool -
Returns
trueif this containsvalue. -
containsAll(
Iterable< T> values) → bool -
Returns
trueif this contains allvalues. -
encloses(
Range< T> other) → bool -
Returns
trueifother'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
trueif 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