Class TraversingIterator
java.lang.Object
org.codehaus.commons.compiler.util.iterator.TraversingIterator
An
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.
-
Field Details
-
nest
-
nextElement
-
nextElementRead
private boolean nextElementRead
-
-
Constructor Details
-
TraversingIterator
-
-
Method Details
-
hasNext
-
next
-
readNext
private boolean readNext()Reads the next element and stores it innextElement.- Returns:
falseif no more element can be read
-
remove
public void remove()- Specified by:
removein interfaceIterator<Object>- Throws:
UnsupportedOperationException- TheIteratorcurrently being traversed doesn't support element removal- See Also:
-