IteratorChain is the right class, but the constructor just adds the one iterator.

You could use the Iterator(Collection) constructor which adds a collection of Iterators. Perhaps use IteratorUtils.toList to create the list?

Alternatively, you could patch IteratorChain to add a factory method that takes an iterator and does what you wanted.

Stephen

Paul Libbrecht wrote:

Hello,

only after a looong quest I realized that new IteratorChain(Iterator) will only iterate through the elements of the given iterator instead of expecting that each element is an iterator itself through which one iterates.

Am I blurred to expect such ?
I suppose that changing this behaviour would be a too strong API change... so should one do an IteratorThroughIterators?? I can offer a class... if wished.

paul

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

Reply via email to