class PeekableListIterator<E> extends Object implements ListIterator<E>
Modifier and Type | Field and Description |
---|---|
private ListIterator<E> |
base |
private E |
next |
private int |
position |
(package private) boolean |
traversed |
Constructor and Description |
---|
PeekableListIterator(ListIterator<E> base) |
Modifier and Type | Method and Description |
---|---|
void |
add(E e) |
boolean |
hasNext() |
boolean |
hasPrevious() |
E |
next() |
int |
nextIndex() |
E |
peek() |
E |
previous() |
int |
previousIndex() |
void |
remove() |
void |
set(E e) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
private E next
private ListIterator<E> base
boolean traversed
private int position
PeekableListIterator(ListIterator<E> base)
public 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>
public E peek()
Copyright © 2017. All rights reserved.