groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Dorner <felix.dor...@gmail.com>
Subject Calling 'each' on org.eclipse.emf.common.util.TreeIterator
Date Tue, 16 Oct 2018 10:23:10 GMT
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.

Mime
View raw message