Enum Axis

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Axis>

    public enum Axis
    extends java.lang.Enum<Axis>
    This is an enumeration class containing constants representing the thirteen XPath axes
    • Enum Constant Detail

      • ANCESTOR

        public static final Axis ANCESTOR
      • ANCESTOR_OR_SELF

        public static final Axis ANCESTOR_OR_SELF
      • ATTRIBUTE

        public static final Axis ATTRIBUTE
      • CHILD

        public static final Axis CHILD
      • DESCENDANT

        public static final Axis DESCENDANT
      • DESCENDANT_OR_SELF

        public static final Axis DESCENDANT_OR_SELF
      • FOLLOWING

        public static final Axis FOLLOWING
      • FOLLOWING_SIBLING

        public static final Axis FOLLOWING_SIBLING
      • PARENT

        public static final Axis PARENT
      • PRECEDING

        public static final Axis PRECEDING
      • PRECEDING_SIBLING

        public static final Axis PRECEDING_SIBLING
      • SELF

        public static final Axis SELF
      • NAMESPACE

        public static final Axis NAMESPACE
    • Method Detail

      • values

        public static Axis[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Axis c : Axis.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Axis valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getAxisNumber

        public int getAxisNumber()
        Get the axis number, as defined in class AxisInfo
        Returns:
        the axis number