Class Vertices

  • public final class Vertices
    extends java.lang.Object
    Common utilities related to DFDataTree.Vertex class.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Vertices.DataTreeLevelComparator
      Compares two vertices according to their level in a data tree to which they belong.
    • Method Detail

      • prettyPrintTree

        public static java.lang.String prettyPrintTree​(DFDataTree.Vertex vertex)
        Pretty-prints tree having given DFDataTree.Vertex as a root.


         +-- root entity ()
             +-- entity A (1:1)
                 |-- entity B (1:1)
                 |   |-- entity C (M:N)
                 |   |   |-- entity D (M:1)
                 |   |   +-- entity I (1:1)
                 |   +-- entity H (1:1)
                 |-- entity E (1:1)
                 |   +-- entity G (1:1)
                 +-- entity F (1:M)

        Note: this method is not considered stable API and might be removed at any time. More generic solution is being considered instead. So use this only during development.

        vertex - vertex whose sub-tree to print
        pretty-printed tree as string