Oleg Tkachenko wrote:
>> Writing a custom iterator for the children
>> list would solve this...
> 
> I agree with you, but this one seems to be simple and would benefit by 
> decoupling fo tree internal structure and its usage. Usual design 
> pattern could be used - hierarcy of custom iterators: EmptyIterator, 
> SingleItemIterator and ArrayIterator.

Wow, that's excellent.

> do we need random access to children?

AFAIR not really, there is an index kept, but this could be
an iterator too.

J.Pietschmann






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to