|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingIterator<T>
public abstract class ForwardingIterator<T>
An iterator which forwards all its method calls to another iterator. Subclasses should override one or more methods to modify the behavior of the backing iterator as desired per the decorator pattern.
ForwardingObject,
Serialized Form| Constructor Summary | |
|---|---|
protected |
ForwardingIterator(java.util.Iterator<T> delegate)
Constructs a forwarding iterator that forwards to the provided delegate. |
| Method Summary | |
|---|---|
protected java.util.Iterator<T> |
delegate()
Returns the backing delegate object. |
boolean |
hasNext()
|
T |
next()
|
void |
remove()
|
| Methods inherited from class com.google.common.collect.ForwardingObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ForwardingIterator(java.util.Iterator<T> delegate)
| Method Detail |
|---|
protected java.util.Iterator<T> delegate()
ForwardingObject @SuppressWarnings("unchecked")
@Override protected Foo delegate() {
return (Foo) super.delegate();
}
This method should always return the same delegate instance that was passed
to the constructor.
delegate in class ForwardingObjectpublic boolean hasNext()
hasNext in interface java.util.Iterator<T>public T next()
next in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||