public class TokenMatcherImpl extends Object implements TokenMatcher
TokenMatcher that runs on top of MatcherNodes.| Constructor and Description |
|---|
TokenMatcherImpl(int flags,
MatcherNode root) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Token token)
Add a token to this matcher returning whether a match has now been found.
|
boolean |
end()
Indicate that this is the end of the current match sequence.
|
boolean |
isMatch()
Get if the matcher is currently matching.
|
void |
reset()
Reset the matching, for when tokens are no longer logically connected,
such as when new sentence has been started.
|
public TokenMatcherImpl(int flags,
MatcherNode root)
public boolean add(Token token)
TokenMatcheradd in interface TokenMatcherpublic boolean end()
TokenMatcher$ if used. In many
cases this would be called at the end of a sentence by a Handler.end in interface TokenMatcherpublic void reset()
TokenMatcherreset in interface TokenMatcherpublic boolean isMatch()
TokenMatcherisMatch in interface TokenMatcherCopyright © 2018. All rights reserved.