I see, that makes sense. Thanks for the clarification. I'll add that to the JavaDoc.
I guess this is due to NodeState not knowing its name, but on the other hand separating the name from the child NodeState allows for enumerating the names only without the need to actually load the states... regards marcel > -----Original Message----- > From: Jukka Zitting [mailto:[email protected]] > Sent: Mittwoch, 12. September 2012 11:35 > To: [email protected] > Subject: Re: ChildNodeEntry > > Hi, > > On Wed, Sep 12, 2012 at 11:29 AM, Marcel Reutegger > <[email protected]> wrote: > > I was wondering why we have the interface ChildNodeEntry? > > It allows you to avoid extra name lookups when traversing over all > children of a node. > > For example, if on a large node the cost of iterating over all child > nodes is O(n) and that of looking up a specific child is O(log n), > then with the cost difference between the alternatives you outlined is > O(n) versus O(n log n). > > BR, > > Jukka Zitting
