Iteratorpublic 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 | Description |
|---|---|
TraversingIterator(Iterator delegate) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
hasNext() |
|
Object |
next() |
|
void |
remove() |
forEachRemainingpublic TraversingIterator(Iterator delegate)
public void remove()
remove in interface IteratorUnsupportedOperationException - iff the Iterator currently being
traversed doesn't support element removalIterator.remove()Copyright © 2001–2019. All rights reserved.