Am 28.11.2015 um 01:25 schrieb Felix Dorner:
I'm a new Groovy user. I am trying to use Groovy in the context of EMF
(www.eclipse.org/emf <http://www.eclipse.org/emf>). This framework
includes a utility class ContentTreeIterator which implements Iterator
and Iterable at the same time. Clients are supposed to access instances
through the Iterator interface. (Using the iterator that's retuned by
iterator() will yield different results than using the object itself as
Since a cast won't work in that situation the only thing I can imagine would be to use an extension method working on ContentTreeIterator or maybe even better on AbstractTreeIterator, if I have seen right in the javadoc.