E - the type of elements returned by this iterator@ParametersAreNonnullByDefault public class SizedIterator<E> extends Object implements Iterator<E>
Iterator that loads each value with a IntFunction.| Constructor and Description |
|---|
SizedIterator(int size,
IntFunction<E> mappingFunction)
Constructs a new
SizedIterator. |
SizedIterator(int size,
IntFunction<E> mappingFunction,
int index)
Constructs a new
SizedIterator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
E |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic SizedIterator(@Nonnegative int size, IntFunction<E> mappingFunction)
SizedIterator.size - the size of the iteratormappingFunction - the function used to retrieve the value at a specified indexpublic SizedIterator(@Nonnegative int size, IntFunction<E> mappingFunction, @Nonnegative int index)
SizedIterator.size - the size of the iteratormappingFunction - the function used to retrieve the value at a specified indexindex - the starting indexCopyright © 2017–2019 Atlanmod. All rights reserved.