Some Feedback: TreeNode:
1. Should it extend Cloneable? Some trees might not be able to be Cloneable effectively (for instance, a Btree backed by a file). 2. I think we should allow setValue to throw an UnsupportedOperationException for unmodifiable trees. 3. What's the rationale for having equals and hashCode be reference based? 4. Must tree iterators be depth-first? The ordered traversal for a heap tree isn't depth-first. 5. How about a valuesIterator method that returns an iterator just for the values? TreeNodeIterator 1. What's the difference between getParentNode() and nextNode().getParentNode()? Other Thoughts 1. A BinaryTreeNode implementation with convenient getLeftChild() and getRightChild() methods. 2. Would it be possible for BinaryTreeNode to somehow have a balance() method that could be overridden to provide various balancing algorithms? So then we could implement, for instance, RedBlackNode or AVLNode. 3. Along these lines, it would be supersexy to provide a SortedMap implementation that could be backed by any BinaryTreeNode implementation. -Paul -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
