Enum Class TreeTraversal.Context

java.lang.Object
java.lang.Enum<TreeTraversal.Context>
com.apicatalog.tree.io.TreeTraversal.Context
All Implemented Interfaces:
Serializable, Comparable<TreeTraversal.Context>, Constable
Enclosing class:
TreeTraversal

public static enum TreeTraversal.Context extends Enum<TreeTraversal.Context>
Identifies the role of the current node within the tree structure during traversal.
  • Enum Constant Details

    • ROOT

      public static final TreeTraversal.Context ROOT
      The current node is the root of the tree being traversed.
    • PROPERTY_KEY

      public static final TreeTraversal.Context PROPERTY_KEY
      The current node is a key within a map structure.
    • PROPERTY_VALUE

      public static final TreeTraversal.Context PROPERTY_VALUE
      The current node is a value associated with a key in a map structure.
    • COLLECTION_ELEMENT

      public static final TreeTraversal.Context COLLECTION_ELEMENT
      The current node is an element within a collection structure.
    • END

      public static final TreeTraversal.Context END
      A synthetic marker indicating the end of a map or collection has been reached.
  • Method Details

    • values

      public static TreeTraversal.Context[] 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 TreeTraversal.Context 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