T - the type of elements returned by this iteratorpublic abstract class ForwardingReiterator<T> extends Object implements Reiterator<T>, Cloneable
| Constructor and Description |
|---|
ForwardingReiterator(Reiterator<T> base)
Constructs a
ForwardingReiterator. |
| Modifier and Type | Method and Description |
|---|---|
protected ForwardingReiterator<T> |
clone() |
ForwardingReiterator<T> |
copy()
Returns a copy of the current
Reiterator. |
boolean |
hasNext() |
T |
next() |
void |
remove() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic ForwardingReiterator(Reiterator<T> base)
ForwardingReiterator.base - supplies a base reiterator to forward requests to. This
reiterator will be used directly; it will not be copied by the constructor.protected ForwardingReiterator<T> clone()
public ForwardingReiterator<T> copy()
Reiterator. The copy's iteration
state is logically independent of the current iterator; each may be
advanced without affecting the other.
The returned Reiterator is not guaranteed to return
referentially identical iteration results as the original
Reiterator, although Object.equals(java.lang.Object) will typically return
true for the corresponding elements of each if the original source is
logically immutable.
This implementation uses clone() to construct a duplicate of the
Reiterator. Derived classes must either implement
Cloneable semantics, or must provide an alternative implementation
of this method.
copy in interface Reiterator<T>