2012/11/5 Felix Meschberger <[email protected]>:
>
> We have to keep the listChildren method for backwards compatibility.

Sure.
>
> getChildren() IMHO just returns an Iterable<Resource> with the 
> AbstractResource providing the default implementation as I sketched in the 
> issue. Alternatively it could return Set<Resource> or Collection<Resource>.

If getChildren just returns Iterable you have to use this method for a
for loop and listChildren for getting an Iterator. Usually APIs
provide both with the same method.

I wouldn't use Set or Collection - a dynamic/lazy iterator is a good choice.

Carsten

>
> Yet, I am not sure, whether I really like this.. This is syntactic sugar for 
> people wanting to use a certain language feature ....
>
> Regards
> Felix



-- 
Carsten Ziegeler
[email protected]

Reply via email to