Class Step


  • public final class Step
    extends Object
    One segment of an Accessor path: a keyword atom optionally indexed (e.g. value, arg(0)).
    • Method Detail

      • of

        public static Step of​(String keyword)
        Creates an unindexed step.
        Parameters:
        keyword - the step keyword
        Returns:
        the step
      • indexed

        public static Step indexed​(String keyword,
                                   int index)
        Creates an indexed step such as arg(0).
        Parameters:
        keyword - the step keyword
        index - the explicit index
        Returns:
        the step
      • keyword

        public String keyword()
        Returns:
        the step keyword
      • hasIndex

        public boolean hasIndex()
        Returns:
        whether an explicit index is present
      • index

        public int index()
        Returns:
        the explicit index, only valid when hasIndex() is true
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object