public class TraversingIterator extends Object implements Iterator
Iterator
that iterates over a delegate, and while it encounters an array, a Collection
, an Enumeration
or a Iterator
element, it iterates over it
recursively.
Be aware that hasNext()
must read ahead one element.
Constructor and Description |
---|
TraversingIterator(Iterator delegate) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
Object |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public TraversingIterator(Iterator delegate)
public void remove()
remove
in interface Iterator
UnsupportedOperationException
- iff the Iterator
currently being
traversed doesn't support element removalIterator.remove()
Copyright © 2001–2016. All rights reserved.