Package org.meeuw.json.grep.matching
Class ScalarRegexpMatcher
- java.lang.Object
-
- org.meeuw.json.grep.matching.ScalarRegexpMatcher
-
- All Implemented Interfaces:
PathMatcher
public class ScalarRegexpMatcher extends Object
Matches the value with a regular expression.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.meeuw.json.grep.matching.PathMatcher
PathMatcher.MatchResult
-
-
Constructor Summary
Constructors Constructor Description ScalarRegexpMatcher(Pattern pattern, String replacement)ScalarRegexpMatcher(Pattern pattern, UnaryOperator<String> replacement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathMatcher.MatchResultmatches(ParseEvent event)protected PathMatcher.MatchResultmatchesScalar(ParseEvent event)Predicate<Path>needsKeyCollection()Predicate<Path>needsObjectCollection()StringtoString()
-
-
-
Constructor Detail
-
ScalarRegexpMatcher
public ScalarRegexpMatcher(Pattern pattern, UnaryOperator<String> replacement)
-
-
Method Detail
-
matchesScalar
protected PathMatcher.MatchResult matchesScalar(ParseEvent event)
-
needsKeyCollection
public Predicate<Path> needsKeyCollection()
- Specified by:
needsKeyCollectionin interfacePathMatcher
-
needsObjectCollection
public Predicate<Path> needsObjectCollection()
- Specified by:
needsObjectCollectionin interfacePathMatcher
-
matches
public final PathMatcher.MatchResult matches(ParseEvent event)
- Specified by:
matchesin interfacePathMatcher- Parameters:
event- The event to match
-
-