You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by fe...@objectaid.com on 2006/02/23 22:13:02 UTC

Contribution to commons-collections?

Hello,

I have written two generic iterators that you might want to include into
commons-collections.

The first one is a generic abstract class named TreeIterator<E> that iterates
over a tree structure given the root node (of type E) and the implementation of
an abstract method that returns an Iterator of a node's children. The
TreeIterator then iterates the tree depth-first. A limitation of this class is
that all encountered tree nodes must be of type E.

The second class is a generic ArrayIterator<E>. It is similar to the existing
ArrayIterator, and I only mention it because the generic version is easier to
use with the above TreeIterator<E>.

Please let me know if you want me to provide the code.

Thanks, Felix

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org