Class TreeUtil



  • public class TreeUtil
    extends Object
    • Constructor Detail

      • TreeUtil

        public TreeUtil()
    • Method Detail

      • traversePreorder

        public static <T> void traversePreorder(Tree<T> tree,
                                                Visitor<TreeNode<T>> visitor)
      • traversePreorder

        public static <T> void traversePreorder(TreeNode<T> node,
                                                Visitor<TreeNode<T>> visitor,
                                                int depth,
                                                int index,
                                                int numSiblings)
      • traversePreorder

        public static <T> void traversePreorder(Tree<T> tree,
                                                TreeNodeVisitor<? super T> visitor)
      • traversePreorder

        public static <T> void traversePreorder(TreeNode<T> node,
                                                TreeNodeVisitor<? super T> visitor,
                                                int depth,
                                                int index,
                                                int numSiblings)
      • traversePostorder

        public static <T> void traversePostorder(Tree<T> tree,
                                                 Visitor<TreeNode<T>> visitor)
      • traversePostorder

        public static <T> void traversePostorder(TreeNode<T> node,
                                                 Visitor<TreeNode<T>> visitor,
                                                 int depth,
                                                 int index,
                                                 int numSiblings)
      • traversePostorder

        public static <T> void traversePostorder(Tree<T> tree,
                                                 TreeNodeVisitor<? super T> visitor)
      • traversePostorder

        public static <T> void traversePostorder(TreeNode<T> node,
                                                 TreeNodeVisitor<? super T> visitor,
                                                 int depth,
                                                 int index,
                                                 int numSiblings)