IterableRange<T extends Comparable<Object?>> class
sealed
A Range that is also iterable.
It is possible to iterate over a Range using iterate.
Properties
-
empty
→ bool
-
Return
true
if this is empty, i.e. [a..a)
.
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
besides(Range<T> other)
→ bool
-
Returns
true
if an empty range exists between this and other
.
inherited
-
contains(T value)
→ bool
-
Returns
true
if this contains value
.
inherited
-
containsAll(Iterable<T> values)
→ bool
-
Returns
true
if this contains all values
.
inherited
-
encloses(Range<T> other)
→ bool
-
Returns
true
if other
's bounds do not extend outside this bounds.
inherited
-
gap(Range<T> other)
→ Interval<T>?
-
If this does not intersect
other
, returns the gap in between. Otherwise returns null
.
inherited
-
intersection(Range<T> other)
→ Range<T>?
-
If this intersects
other
, returns the intersection. Otherwise returns null
.
inherited
-
intersects(Range<T> other)
→ bool
-
Returns
true
if a non-empty range exists between this and other
.
inherited
-
iterate({required T by(T current)})
→ Iterable<T>
-
Returns a lazy
Iterable
by stepping through this range using by
.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited