Range<T extends Comparable> class abstract

Represents a range of values (for example, numbers or characters) with a fixed start value and a fixed endInclusive value.

T extends Comparable and not Comparable<T> because T is int for IntRange but int implements Comparable<num> not Comparable<int>.

ComparableRange shows

Implementers

Constructors

Range()
const

Properties

endInclusive → T
The last value in the range (inclusive).
no setter
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start → T
The first value in the range.
no setter

Methods

contains(T value) bool
Checks whether the specified value belongs to the range, is equal to start or endInclusive or lies between them
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override