class WktKeywordToken extends java.lang.Object implements WktToken
WktToken that represents a keyword| Modifier and Type | Field and Description |
|---|---|
private java.util.regex.Pattern |
pattern |
| Constructor and Description |
|---|
WktKeywordToken(java.lang.String word)
Constructs the token.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.regex.Pattern |
getPattern()
Returns the Regex pattern for this token.
|
boolean |
matches(java.lang.CharSequence wkt,
int currentPos,
int endPos)
Attempts to match the specified subsequence of a
CharSequence to this WktToken. |
java.lang.String |
toString() |
public WktKeywordToken(java.lang.String word)
word - the regex pattern to identify the keyword in the input text.public boolean matches(java.lang.CharSequence wkt,
int currentPos,
int endPos)
CharSequence to this WktToken.wkt - the input textcurrentPos - the start position for the matchendPos - the end position for the matchWktDecodeException - if nothing matches at the specified substring.public java.util.regex.Pattern getPattern()
public java.lang.String toString()
toString in class java.lang.Object