Package com.google.common.collect
Class Constraints.ConstrainedListIterator<E>
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- com.google.common.collect.ForwardingIterator<E>
-
- com.google.common.collect.ForwardingListIterator<E>
-
- com.google.common.collect.Constraints.ConstrainedListIterator<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>
,java.util.ListIterator<E>
- Enclosing class:
- Constraints
static class Constraints.ConstrainedListIterator<E> extends ForwardingListIterator<E>
-
-
Field Summary
Fields Modifier and Type Field Description private Constraint<? super E>
constraint
private java.util.ListIterator<E>
delegate
-
Constructor Summary
Constructors Constructor Description ConstrainedListIterator(java.util.ListIterator<E> delegate, Constraint<? super E> constraint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(E element)
protected java.util.ListIterator<E>
delegate()
Returns the backing delegate instance that methods are forwarded to.void
set(E element)
-
Methods inherited from class com.google.common.collect.ForwardingListIterator
hasPrevious, nextIndex, previous, previousIndex
-
Methods inherited from class com.google.common.collect.ForwardingIterator
hasNext, next, remove
-
Methods inherited from class com.google.common.collect.ForwardingObject
toString
-
-
-
-
Field Detail
-
delegate
private final java.util.ListIterator<E> delegate
-
constraint
private final Constraint<? super E> constraint
-
-
Constructor Detail
-
ConstrainedListIterator
public ConstrainedListIterator(java.util.ListIterator<E> delegate, Constraint<? super E> constraint)
-
-
Method Detail
-
delegate
protected java.util.ListIterator<E> delegate()
Description copied from class:ForwardingObject
Returns 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:
delegate
in classForwardingListIterator<E>
-
add
public void add(E element)
- Specified by:
add
in interfacejava.util.ListIterator<E>
- Overrides:
add
in classForwardingListIterator<E>
-
set
public void set(E element)
- Specified by:
set
in interfacejava.util.ListIterator<E>
- Overrides:
set
in classForwardingListIterator<E>
-
-