public final class WhitespaceTokenizer extends CharTokenizer
You may specify the Version
compatibility when creating
WhitespaceTokenizer
:
CharTokenizer
uses an int based API to normalize and
detect token characters. See CharTokenizer.isTokenChar(int)
and
CharTokenizer.normalize(int)
for details.AttributeSource.State
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
DEFAULT_ATTRIBUTE_FACTORY
Constructor and Description |
---|
WhitespaceTokenizer(AttributeFactory factory,
Reader in)
Construct a new WhitespaceTokenizer using a given
AttributeFactory . |
WhitespaceTokenizer(Reader in)
Construct a new WhitespaceTokenizer.
|
WhitespaceTokenizer(Version matchVersion,
AttributeFactory factory,
Reader in)
Deprecated.
|
WhitespaceTokenizer(Version matchVersion,
Reader in)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isTokenChar(int c)
Collects only characters which do not satisfy
Character.isWhitespace(int) . |
end, incrementToken, normalize, reset
close, correctOffset, setReader
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
public WhitespaceTokenizer(Reader in)
in
- the input to split up into tokens@Deprecated public WhitespaceTokenizer(Version matchVersion, Reader in)
WhitespaceTokenizer(Reader)
public WhitespaceTokenizer(AttributeFactory factory, Reader in)
AttributeFactory
.factory
- the attribute factory to use for this Tokenizer
in
- the input to split up into tokens@Deprecated public WhitespaceTokenizer(Version matchVersion, AttributeFactory factory, Reader in)
WhitespaceTokenizer(AttributeFactory, Reader)
protected boolean isTokenChar(int c)
Character.isWhitespace(int)
.isTokenChar
in class CharTokenizer
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.