public abstract class StringMatcher
extends java.lang.Object
Constructor and Description |
---|
StringMatcher() |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(java.lang.String string)
Checks whether the given string matches.
|
protected abstract boolean |
matches(java.lang.String string,
int beginOffset,
int endOffset)
Checks whether the given substring matches.
|
java.lang.String |
prefix()
Returns a common prefix of all strings matched by this
StringMatcher . |
public boolean matches(java.lang.String string)
string
- the string to match.public java.lang.String prefix()
StringMatcher
. If the returned
value is null, then this StringMatcher
does not match any string.protected abstract boolean matches(java.lang.String string, int beginOffset, int endOffset)
string
- the string to match.beginOffset
- the start offset of the substring (inclusive).endOffset
- the end offset of the substring (exclusive).