Enum Class Axis

java.lang.Object
java.lang.Enum<Axis>
org.basex.query.expr.path.Axis
All Implemented Interfaces:
Serializable, Comparable<Axis>, java.lang.constant.Constable

public enum Axis extends Enum<Axis>
XPath axes.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Enum Constant Details

    • ANCESTOR_OR_SELF

      public static final Axis ANCESTOR_OR_SELF
      Ancestor-or-self axis.
    • ANCESTOR

      public static final Axis ANCESTOR
      Ancestor axis.
    • ATTRIBUTE

      public static final Axis ATTRIBUTE
      Attribute axis.
    • CHILD

      public static final Axis CHILD
      Child axis.
    • DESCENDANT_OR_SELF

      public static final Axis DESCENDANT_OR_SELF
      Descendant-or-self axis.
    • DESCENDANT

      public static final Axis DESCENDANT
      Descendant axis.
    • FOLLOWING_SIBLING

      public static final Axis FOLLOWING_SIBLING
      Following-sibling axis.
    • FOLLOWING

      public static final Axis FOLLOWING
      Following axis.
    • PARENT

      public static final Axis PARENT
      Parent axis.
    • PRECEDING_SIBLING

      public static final Axis PRECEDING_SIBLING
      Preceding-sibling axis.
    • PRECEDING

      public static final Axis PRECEDING
      Preceding axis.
    • SELF

      public static final Axis SELF
      Step axis.
  • Field Details

    • VALUES

      public static final Axis[] VALUES
      Cached enums (faster).
    • name

      public final String name
      Name of axis.
    • down

      public final boolean down
      Downward axis.
  • Method Details

    • values

      public static Axis[] 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 Axis 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
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Axis>
    • invert

      public final Axis invert()
      Inverts the axis.
      Returns:
      inverted axis