public class TraversingIterator
extends java.lang.Object
implements java.util.Iterator
Iterator that iterates over a delegate, and while
it encounters an array, a Collection, an
Enumeration or a Iterator element, it iterates
into it recursively.
Be aware that hasNext() must read ahead one element.
| Constructor and Description |
|---|
TraversingIterator(java.util.Iterator delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
java.lang.Object |
next() |
void |
remove() |
public boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - iff the Iterator currently being
traversed doesn't support element removalIterator.remove()