Class TraditionalTreePrinter

  • All Implemented Interfaces:
    TreePrinter

    public class TraditionalTreePrinter
    extends java.lang.Object
    implements TreePrinter
    TreePrinter implementation that prints the tree structure in a traditional fashion.

    Example output with the default settings:

                        Root
        ┌──────────────┬──┴──────────────┐
        │              │                 │
     Child1         Child2            Child3
                 ┌─────┴─────┐           │
                 │           │           │
            Grandchild1 Grandchild2 Grandchild3
     
    • Field Detail

      • DEFAULT_ALIGNER

        public static final Aligner DEFAULT_ALIGNER
      • DEFAULT_LINER

        public static final Liner DEFAULT_LINER
    • Constructor Detail

      • TraditionalTreePrinter

        public TraditionalTreePrinter()
      • TraditionalTreePrinter

        public TraditionalTreePrinter​(Aligner aligner,
                                      Liner liner)
      • TraditionalTreePrinter

        public TraditionalTreePrinter​(boolean displayPlaceholders)
      • TraditionalTreePrinter

        public TraditionalTreePrinter​(Aligner aligner,
                                      Liner liner,
                                      boolean displayPlaceholders)
    • Method Detail

      • print

        public void print​(TreeNode rootNode,
                          java.lang.Appendable out)
        Specified by:
        print in interface TreePrinter