T
- Items typepublic final class ListIterator<T> extends Object implements ListIterator<T>
There is no thread-safety guarantee.
Constructor and Description |
---|
ListIterator(List<T> list)
Ctor.
|
ListIterator(List<T> list,
int index)
Ctor.
|
ListIterator(ListIterator<T> iter)
Ctor.
|
ListIterator(Scalar<ListIterator<T>> orig)
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 ListIterator(List<T> list)
list
- List that will be called to get a list iterator.public ListIterator(List<T> list, int index)
list
- List that will be called to get a list iterator.index
- Start index for a newly created list iterator.public ListIterator(ListIterator<T> iter)
iter
- Original list iterator.public ListIterator(Scalar<ListIterator<T>> orig)
orig
- 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–2019 Cactoos. All rights reserved.