moveNext method
Advances the iterator to the next element of the iteration.
Should be called before reading current.
If the call to moveNext
returns true
,
then current will contain the next element of the iteration
until moveNext
is called again.
If the call returns false
, there are no further elements
and current should not be used any more.
It is safe to call moveNext after it has already returned false
,
but it must keep returning false
and not have any other effect.
A call to moveNext
may throw for various reasons,
including a concurrent change to an underlying collection.
If that happens, the iterator may be in an inconsistent
state, and any further behavior of the iterator is unspecified,
including the effect of reading current.
final colors = ['blue', 'yellow', 'red'];
final colorsIterator = colors.iterator;
print(colorsIterator.moveNext()); // true
print(colorsIterator.moveNext()); // true
print(colorsIterator.moveNext()); // true
print(colorsIterator.moveNext()); // false
Implementation
dc.bool moveNext(){
final dc.bool and$7468_$AUTO_$1=(i<to);
if(and$7468_$AUTO_$1){
if((0==(i&31))){
if((((v.cnt-1)&(~31))<=i)){
curr=v.tail;
}else{
curr=lcoc_core.unchecked_array_for(v.root, v.shift, i, );
}
}else{
}
i=(1+i);
return true;
}
return and$7468_$AUTO_$1;
}