java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingIterator<E>
com.google.common.collect.ForwardingListIterator<E>
- All Implemented Interfaces:
- Iterator<E>,- ListIterator<E>
@GwtCompatible
public abstract class ForwardingListIterator<E extends @Nullable Object>
extends ForwardingIterator<E>
implements ListIterator<E>
A list iterator which forwards all its method calls to another list iterator. Subclasses should
 override one or more methods to modify the behavior of the backing iterator as desired per the decorator pattern.
 
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.
- Since:
- 2.0
- Author:
- Mike Bostock
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor for use by subclasses.
- 
Method SummaryModifier and TypeMethodDescriptionvoidprotected abstract ListIterator<E> delegate()Returns the backing delegate instance that methods are forwarded to.booleanintprevious()intvoidMethods inherited from class com.google.common.collect.ForwardingIteratorhasNext, next, removeMethods inherited from class com.google.common.collect.ForwardingObjecttoStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.IteratorforEachRemainingMethods inherited from interface java.util.ListIteratorhasNext, next, remove
- 
Constructor Details- 
ForwardingListIteratorprotected ForwardingListIterator()Constructor for use by subclasses.
 
- 
- 
Method Details- 
delegateDescription copied from class:ForwardingObjectReturns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such asForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.- Specified by:
- delegatein class- ForwardingIterator<E extends @Nullable Object>
 
- 
add
- 
hasPreviouspublic boolean hasPrevious()- Specified by:
- hasPreviousin interface- ListIterator<E extends @Nullable Object>
 
- 
nextIndexpublic int nextIndex()- Specified by:
- nextIndexin interface- ListIterator<E extends @Nullable Object>
 
- 
previous- Specified by:
- previousin interface- ListIterator<E extends @Nullable Object>
 
- 
previousIndexpublic int previousIndex()- Specified by:
- previousIndexin interface- ListIterator<E extends @Nullable Object>
 
- 
set
 
-