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

public class PathMatch extends Object
Describes how a path may be matched
  • Constructor Details

    • PathMatch

      public PathMatch(Object pathStart, Object... pathRemainder)
      Constructed with at least one value which may be String, Pattern or PathWildCard
      Parameters:
      pathStart - first part of the path expression
      pathRemainder - remaining elements of the path expression
  • Method Details

    • all

      public static PathMatch all()
      A path match that matches everywhere
      Returns:
      matches everything
    • ofJsonPointer

      public static PathMatch ofJsonPointer(String jsonPointer)
      Convert from JSON Pointer to path match
      Parameters:
      jsonPointer - the JSON pointer express
      Returns:
      a new PathMatch
    • matches

      public boolean matches(Location location)
      Find out whether this path match fits the location
      Parameters:
      location - the location to check
      Returns:
      true if the path matches
    • toString

      public String toString()
      Overrides:
      toString in class Object