public abstract class CharTokenizer extends Tokenizer
AttributeSource.State
DEFAULT_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, setReader
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
public CharTokenizer()
CharTokenizer
instancepublic CharTokenizer(AttributeFactory factory)
CharTokenizer
instancefactory
- the attribute factory to use for this Tokenizer
protected abstract boolean isTokenChar(int c)
protected int normalize(int c)
public final boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public final void end() throws IOException
end
in class TokenStream
IOException
public void reset() throws IOException
reset
in class Tokenizer
IOException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.