T
- Items typepublic final class ImmutableListIterator<T> extends Object implements ListIterator<T>
ListIterator
that doesn't allow mutations.
There is no thread-safety guarantee.
Constructor and Description |
---|
ImmutableListIterator(ListIterator<T> iter)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(T item) |
boolean |
hasNext() |
boolean |
hasPrevious() |
T |
next() |
int |
nextIndex() |
T |
previous() |
int |
previousIndex() |
void |
remove() |
void |
set(T item) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ImmutableListIterator(ListIterator<T> iter)
iter
- Original list iterator.public boolean hasNext()
public T next()
public boolean hasPrevious()
hasPrevious
in interface ListIterator<T>
public T previous()
previous
in interface ListIterator<T>
public int nextIndex()
nextIndex
in interface ListIterator<T>
public int previousIndex()
previousIndex
in interface ListIterator<T>
public void remove()
public void set(T item)
set
in interface ListIterator<T>
public void add(T item)
add
in interface ListIterator<T>
Copyright © 2017–2021 Cactoos. All rights reserved.