public class StringMatcher extends SequenceMatcher
SequenceMatcher
specialization for sequences of CharMatchers. Performs fast string matching if the
current context has it enabled.Modifier and Type | Field and Description |
---|---|
char[] |
characters |
Constructor and Description |
---|
StringMatcher(Rule[] charMatchers,
char[] characters) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLabel() |
boolean |
hasCustomLabel() |
boolean |
match(MatcherContext context)
Tries a match on the given MatcherContext.
|
accept
defaultLabel
areMismatchesMemoed, areSubnodesSuppressed, getSubContext, getTag, isNodeSkipped, isNodeSuppressed, label, memoMismatches, setTag, skipNode, suppressNode, suppressSubnodes, toString
getChildren
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChildren
public StringMatcher(Rule[] charMatchers, char[] characters)
public java.lang.String getLabel()
getLabel
in interface Matcher
getLabel
in class CustomDefaultLabelMatcher<SequenceMatcher>
public boolean hasCustomLabel()
hasCustomLabel
in interface Matcher
hasCustomLabel
in class CustomDefaultLabelMatcher<SequenceMatcher>
public boolean match(MatcherContext context)
Matcher
match
in interface Matcher
match
in class SequenceMatcher
context
- the MatcherContext