IntRangeIterator class
An iterator over a progression of values of type int. Iterable that gives items between start and end with step size step. It iterates through given range with step size step. Default value of step is 1. This implementation is end inclusive, meaning that the end value is also a part of the range. For Example, IntRangeIterator(1, 5) would give elements 1,2,3,4,5 IntRangeIterator(1, 10, step: 2) would give elements 1,3.5.7.9
- Implemented types
- Available Extensions
Constructors
- IntRangeIterator(int start, int end, {int step = 1})
- Default constructor for this iterator
Properties
- current → int
-
The current element.
no setteroverride
- end → int
-
The upper bound of for the range. This might be or might not
be the last element which is totally based on the start and step.
Example:
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 → int
-
The lower bound of for the range.
It will always be the first element.
final
- step → int
-
The number by which the value is incremented on each step.
final
Methods
-
moveNext(
) → bool -
Advances the iterator to the next element of the iteration.
override
-
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