public static class CombinedWordRule.WordMatcher
extends java.lang.Object
| Constructor and Description |
|---|
WordMatcher() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWord(java.lang.String word,
IToken token)
Adds a word and the token to be returned if it is detected.
|
void |
clearWords()
Removes all words.
|
IToken |
evaluate(ICharacterScanner scanner,
CombinedWordRule.CharacterBuffer word)
Returns the token associated to the given word and the scanner state.
|
public void addWord(java.lang.String word,
IToken token)
word - the word this rule will search for, may not be nulltoken - the token to be returned if the word has been found, may not be nullpublic IToken evaluate(ICharacterScanner scanner, CombinedWordRule.CharacterBuffer word)
scanner - the scannerword - the wordnull if none is associated by this matcherpublic void clearWords()