public class ListMatcher extends StringMatcher
StringMatcher tests whether strings match a given list of StringMatcher
instances. The instances are considered sequentially. Each instance in the
list can optionally be negated, meaning that a match makes the entire
remaining match fail.| Constructor and Description |
|---|
ListMatcher(StringMatcher... matchers) |
ListMatcher(StringMatcher[] matchers,
boolean[] negate) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
matches(java.lang.String string,
int beginOffset,
int endOffset)
Checks whether the given substring matches.
|
matchespublic ListMatcher(StringMatcher... matchers)
public ListMatcher(StringMatcher[] matchers, boolean[] negate)
protected boolean matches(java.lang.String string,
int beginOffset,
int endOffset)
StringMatchermatches in class StringMatcherstring - the string to match.beginOffset - the start offset of the substring (inclusive).endOffset - the end offset of the substring (exclusive).