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.
|
matches, prefix
public ListMatcher(StringMatcher... matchers)
public ListMatcher(StringMatcher[] matchers, boolean[] negate)
protected boolean matches(java.lang.String string, int beginOffset, int endOffset)
StringMatcher
matches
in class StringMatcher
string
- the string to match.beginOffset
- the start offset of the substring (inclusive).endOffset
- the end offset of the substring (exclusive).