Package org.meeuw.json.grep.matching
Class SinglePathMatcher
- java.lang.Object
-
- org.meeuw.json.grep.matching.KeysMatcher
-
- org.meeuw.json.grep.matching.SinglePathMatcher
-
- All Implemented Interfaces:
PathMatcher
public class SinglePathMatcher extends KeysMatcher
A single path matches precisely one 'path'. For multiple matches we'd wrap them inPathMatcherOrChainorPathMatcherAndChain
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.meeuw.json.grep.matching.PathMatcher
PathMatcher.MatchResult
-
-
Constructor Summary
Constructors Constructor Description SinglePathMatcher(boolean ignoreArrays, KeysPattern... pathPattern)SinglePathMatcher(KeysPattern... pathPattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeysPattern[]getPatterns()booleanmatches(List<PathEntry> path)StringtoString()-
Methods inherited from class org.meeuw.json.grep.matching.KeysMatcher
matches, needsKeyCollection, needsObjectCollection
-
-
-
-
Constructor Detail
-
SinglePathMatcher
public SinglePathMatcher(KeysPattern... pathPattern)
-
SinglePathMatcher
public SinglePathMatcher(boolean ignoreArrays, KeysPattern... pathPattern)
-
-
Method Detail
-
matches
public boolean matches(List<PathEntry> path)
- Specified by:
matchesin classKeysMatcher
-
getPatterns
public KeysPattern[] getPatterns()
-
-