Class TreePrinter

    • Method Detail

      • print

        public static <T> String print​(AbstractTreeNode<T> tree)
        Prints the given tree
        Use for debug purposes only.
        Type Parameters:
        T - the type of the values of the leaves of the tree.
        Parameters:
        tree - The tree to print
        Returns:
        The string representing the tree
      • print

        public static <T> String print​(AbstractTreeNode<T> tree,
                                       Function<T,​String> leafStringifier)
        Prints the given tree
        Use for debug purposes only.
        Type Parameters:
        T - the type of the values of the leaves of the tree.
        Parameters:
        tree - The tree to print
        leafStringifier - The function to transform a leaf value to a readable String
        Returns:
        The string representing the tree