public final class OptionalMatcher extends CustomDefaultLabelMatcher<OptionalMatcher>
Matcher that tries its submatcher once against the input and always succeeds.| Constructor and Description |
|---|
OptionalMatcher(Rule subRule) |
| Modifier and Type | Method and Description |
|---|---|
MatcherType |
getType()
Returns the type of this matcher
|
<V> boolean |
match(MatcherContext<V> context)
Tries a match on the given MatcherContext.
|
getLabel, hasCustomLabelgetSubContext, label, toStringgetChildrenclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChildrenpublic OptionalMatcher(Rule subRule)
public MatcherType getType()
MatcherMatcherTypepublic <V> boolean match(MatcherContext<V> context)
Matchercontext - the MatcherContext