The current API does not support polymorphic access to elements - it expects them all to be an E.
Using generics with containers breaks down a little due to Java's limited type model, but I suspect some methods could be relaxed to take INode<? extends E>, and provide INode<? super E>, supporting operations between trees with related but different types.
Also, it would be nice to be able to create an IWalker that is restricted to visiting nodes of type .
The current API does not support polymorphic access to elements - it expects them all to be an E.
Using generics with containers breaks down a little due to Java's limited type model, but I suspect some methods could be relaxed to take INode<? extends E>, and provide INode<? super E>, supporting operations between trees with related but different types.
Also, it would be nice to be able to create an IWalker that is restricted to visiting nodes of type .