Extent<E> class

Encloses an extent with a inclusive lower limit and exclusive upper limit.

final extent = Extent<int>(5, 10);
Implemented types
Available extensions

Constructors

Extent(E lower, E upper, {Comparator? comparator})
Creates an extent with lower limit and upper limit
const

Properties

comparator Comparator
final
distance → T

Available on Extent<T>, provided by the NumExtentExt extension

no setter
hashCode int
The hash code for this object.
no setteroverride
inverted Extent<E>
no setter
isAscending bool
no setter
isDescending bool
no setter
largest → T

Available on Extent<T>, provided by the NumExtentExt extension

no setter
lower → E
Inclusive lower limit of the extent
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
smallest → T

Available on Extent<T>, provided by the NumExtentExt extension

no setter
upper → E
Exclusive upper limit of the extent
final

Methods

asList() List<E>
Returns limit as List
compareTo(Extent<E> other) int
Compares this object to another object.
override
has(E input) bool
linspace(dynamic count) Iterable<E>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rands(int count, {Random? source}) Iterable<double>

Available on Extent<double>, provided by the DoubleExtentExt extension

rands(int count, {Random? source}) Iterable<int>

Available on Extent<int>, provided by the IntExtentExt extension

range(dynamic step) Iterable<E>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
Compares if this and other are equal
override

Static Methods

findExtent<E>(Iterable<E> data, {Comparator? comparator}) Extent<E>?
Computes an Extent from given data by finding the minimum and maximum.
fromEdges<E>(Iterable<E> data, {Comparator? comparator}) List<Extent<E>>