@GwtCompatible public abstract class ForwardingListIterator<E> extends ForwardingIterator<E> implements ListIterator<E>
default
method warning: This class forwards calls to only some default
methods. Specifically, it forwards calls only for methods that existed before default
methods were introduced. For newer methods, like forEachRemaining
, it
inherits their default implementations. When those implementations invoke methods, they invoke
methods on the ForwardingListIterator
.
Modifier | Constructor and Description |
---|---|
protected |
ForwardingListIterator()
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
void |
add(E element) |
protected abstract ListIterator<E> |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
boolean |
hasPrevious() |
int |
nextIndex() |
E |
previous() |
int |
previousIndex() |
void |
set(E element) |
hasNext, next, remove
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
hasNext, next, remove
forEachRemaining
protected ForwardingListIterator()
protected abstract ListIterator<E> delegate()
ForwardingObject
ForwardingSet.delegate()
. Concrete subclasses override this method to supply
the instance being decorated.delegate
in class ForwardingIterator<E>
public void add(E element)
add
in interface ListIterator<E>
public boolean hasPrevious()
hasPrevious
in interface ListIterator<E>
public int nextIndex()
nextIndex
in interface ListIterator<E>
public E previous()
previous
in interface ListIterator<E>
public int previousIndex()
previousIndex
in interface ListIterator<E>
public void set(E element)
set
in interface ListIterator<E>
Copyright © 2010-2016. All Rights Reserved.