Package org.meeuw.json.grep.matching
Class ReplaceScalarMatcher
- java.lang.Object
-
- org.meeuw.json.grep.matching.ReplaceScalarMatcher
-
- All Implemented Interfaces:
PathMatcher
public class ReplaceScalarMatcher extends Object
- Author:
- Michiel Meeuwissen
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.meeuw.json.grep.matching.PathMatcher
PathMatcher.MatchResult
-
-
Constructor Summary
Constructors Constructor Description ReplaceScalarMatcher(String replacement)ReplaceScalarMatcher(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
-
ReplaceScalarMatcher
public ReplaceScalarMatcher(UnaryOperator<String> replacement)
-
ReplaceScalarMatcher
public ReplaceScalarMatcher(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
-
-