Range<T extends Comparable> class

Anything with comparable start and end.

Allows to compare ranges to see if they overlap or entirely go one after another.

Available Extensions

Constructors

Range(T start, T end)
Creates an instance.

Properties

end → T
The end of the range.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start → T
The start of the range.
final

Methods

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

Static Methods

after<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a starts after b ends.
afterExclusive<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a starts after or where b ends.
afterInclusive<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a starts after b ends.
afterOrTouching<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a starts after or where b ends.
before<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a ends before b starts.
beforeExclusive<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a ends before or where b starts.
beforeInclusive<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a ends before b starts.
beforeOrTouching<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if a ends before or where b starts.
overlap<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if the ranges overlap deeper than their limiting points.
overlapExclusive<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if the ranges overlap or touch one another.
overlapInclusive<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if the ranges overlap deeper than their limiting points.
overlapOrTouch<T extends Comparable>(Range<T> a, Range<T> b) bool
Returns if the ranges overlap or touch one another.