Enum Class Tree.Order

java.lang.Object
java.lang.Enum<Tree.Order>
io.vavr.collection.Tree.Order
All Implemented Interfaces:
Serializable, Comparable<Tree.Order>, Constable
Enclosing interface:
Tree<T>

public static enum Tree.Order extends Enum<Tree.Order>
Tree traversal order.

Example tree:

 
         1
        / \
       /   \
      /     \
     2       3
    / \     /
   4   5   6
  /       / \
 7       8   9
 
 

See also

  • Enum Constant Details

    • PRE_ORDER

      public static final Tree.Order PRE_ORDER
      1 2 4 7 5 3 6 8 9 (= depth-first)
    • IN_ORDER

      public static final Tree.Order IN_ORDER
      7 4 2 5 1 8 6 9 3
    • POST_ORDER

      public static final Tree.Order POST_ORDER
      7 4 5 2 8 9 6 3 1
    • LEVEL_ORDER

      public static final Tree.Order LEVEL_ORDER
      1 2 3 4 5 6 7 8 9 (= breadth-first)
  • Constructor Details

    • Order

      private Order()
  • Method Details

    • values

      public static Tree.Order[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Tree.Order valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null