Class Path

java.lang.Object
overit.geocall.util.gson.Path

public class Path extends Object
  • Field Details

    • absolute

      protected boolean absolute
  • Constructor Details

    • Path

      public Path(String s)
      Creates a new Path
      Parameters:
      s - String containing the path
  • Method Details

    • getNode

      public Path.Node getNode(int i)
      Returns the Path.Node in the given position
      Parameters:
      i - The position of the Path.Node
      Returns:
      The Path.Node in the given position
    • absolute

      public boolean absolute()
      Returns if the path is absolute
      Returns:
      true if the path is absolute, false otherwise
    • pushName

      public void pushName(String name)
      Push a new Name
      Parameters:
      name - String containing the name
    • pushPos

      public void pushPos(int pos)
      Push a new position
      Parameters:
      pos - Integer containing the position
    • pop

      public void pop()
      Removes the last token
    • size

      public int size()
      Returns the token size of the path
      Returns:
      The token size of the path
    • matches

      public boolean matches(Path p)
      Returns if two path matches
      Parameters:
      p - The path to check
      Returns:
      true if the two path matches, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object