public class TraversingIterator extends Object implements Iterator<Object>
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, waitforEachRemainingpublic TraversingIterator(Iterator<?> delegate)
public void remove()
remove in interface Iterator<Object>UnsupportedOperationException - The Iterator currently being traversed doesn't support element
removalIterator.remove()Copyright © 2019. All rights reserved.