public abstract class CharTokenizer extends Tokenizer
AttributeSource.StateDEFAULT_TOKEN_ATTRIBUTE_FACTORY| Constructor and Description |
|---|
CharTokenizer()
Creates a new
CharTokenizer instance |
CharTokenizer(AttributeFactory factory)
Creates a new
CharTokenizer instance |
| Modifier and Type | Method and Description |
|---|---|
void |
end() |
boolean |
incrementToken() |
protected abstract boolean |
isTokenChar(int c)
Returns true iff a codepoint should be included in a token.
|
protected int |
normalize(int c)
Called on each token character to normalize it before it is added to the
token.
|
void |
reset() |
close, correctOffset, setReaderaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic CharTokenizer()
CharTokenizer instancepublic CharTokenizer(AttributeFactory factory)
CharTokenizer instancefactory - the attribute factory to use for this Tokenizerprotected abstract boolean isTokenChar(int c)
protected int normalize(int c)
public final boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic final void end()
throws IOException
end in class TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class TokenizerIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.