I'd expect that to work the same as if you used a while loop with hasNext()
and next(). If your data structure has further containers and next()
doesn't normally walk through the containers, then I'd expect you to have
more work to do. Is that not what you are seeing?

Cheers, Paul.

On Tue, Oct 16, 2018 at 8:23 PM Felix Dorner <felix.dor...@gmail.com> wrote:

> Hi,
>
> I can do:
> def a = [1,2,3].iterator()
> a.each {
>    println it
> }
>
> Cool, I can walk EMF EObject trees like this, I thought:
>
> Iterator i = anEObject.eAllContents() // this gives a TreeIterator, a
> subinterface of Iterator
> it.each {
>   println it
> }
>
> But that doesn't work :(. It only prints anEObject, not the whole content
> tree. Anyone can explain why?
>
>
> --
> Linux. The choice of a GNU generation.
>

Reply via email to