- All Implemented Interfaces:
java.util.Iterator
- Enclosing class:
- ForEachSupport
private static class ForEachSupport.ToEndIterator
extends ForEachSupport.ReadOnlyIterator
Iterator that simply counts up to 'end.'
Unlike the previous implementation this does not attempt to pre-allocate an array
containing all values from 0 to 'end' as that can result in excessive memory allocation
for large values of 'end.'
LoopTagSupport calls next() 'begin' times in order to discard the initial values,
In order to maintain this contract, this implementation always starts at 0.
Future optimization to skip these redundant calls might be possible.