Class RegexPathMatcher

java.lang.Object
uk.org.webcompere.modelassert.json.condition.tree.RegexPathMatcher
All Implemented Interfaces:
PathMatcher

public class RegexPathMatcher extends Object implements PathMatcher
Matches a Json pointer sub path on the tree using a regular expression
  • Field Details

    • ANY_FIELD_PATTERN

      public static final Pattern ANY_FIELD_PATTERN
  • Constructor Details

    • RegexPathMatcher

      public RegexPathMatcher(Pattern pattern)
  • Method Details

    • matches

      public boolean matches(Location location, List<PathMatcher> remaining)
      Description copied from interface: PathMatcher
      Does this path matcher prevent a match, or do any of its successors prevent a match
      Specified by:
      matches in interface PathMatcher
      Parameters:
      location - the location
      remaining - the remaining PathMatchers
      Returns:
      true if there's a match
    • toString

      public String toString()
      Overrides:
      toString in class Object