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