Hi,

Am 05.11.2012 um 14:00 schrieb Carsten Ziegeler:

> Hi,
> 
> i would like to include
> https://issues.apache.org/jira/browse/SLING-2641 in the next API
> release.
> Looking at the issue and the discussion so far, I think we should add
> a getChildren() method to both, the Resource interface and the
> ResourceResolver.
> 
> However, what do we use as the return type? Just Iterable or a
> ResourceIterator inheriting from Iterable and Iterator?
> If we just return Iterable we still need the listChildren method, so I
> have a slight pref for ResourceIterator
> 
> WDYT?

We have to keep the listChildren method for backwards compatibility.

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>.

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

Reply via email to