java.lang.Object
uk.org.webcompere.modelassert.json.condition.tree.Location

public class Location extends Object
Describes the JSON pointer up to a position in the tree
  • Constructor Details

    • Location

      public Location()
      An empty location
  • Method Details

    • child

      public Location child(String child)
      The location with a child
      Parameters:
      child - the child to add
      Returns:
      a new Location with the child attached
    • peelOffFirst

      public Location peelOffFirst()
      Slice the front off the location, and produce the rest of the path
      Returns:
      the remainder of the location
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isEmpty

      public boolean isEmpty()
      Is there nothing left of the path - are we at the root? or have we peeled off all the first
      Returns:
      true if there's no path in here
    • first

      public String first()
      Get the first part of the path
      Returns:
      the first part of the path or null if there isn't any