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 |
---|---|
T |
defaultLabel(String defaultLabel) |
String |
getLabel() |
boolean |
hasCustomLabel() |
boolean |
match(MatcherContext context)
Tries a match on the given MatcherContext.
|
accept
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 String getLabel()
public boolean hasCustomLabel()
hasCustomLabel
in interface Matcher
public boolean match(MatcherContext context)
Matcher
match
in interface Matcher
match
in class SequenceMatcher
context
- the MatcherContextpublic T defaultLabel(String defaultLabel)
Copyright © 2012. All Rights Reserved.