|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.tokenizer.CharacterTokenizerFactory
public class CharacterTokenizerFactory
A CharacterTokenizerFactory considers each
non-whitespace character in the input to be a distinct token. This
factory is useful for handling languages such as Chinese, which
includes thousands of characters and presents a difficult tokenization
problem for standard tokenizers.
Because the tokenizer factory is thread safe and immutable, the
recommended usage is through the static singleton instance INSTANCE.
INSTANCE.
| Field Summary | |
|---|---|
static TokenizerFactory |
FACTORY
Deprecated. Use INSTANCE instead. |
static TokenizerFactory |
INSTANCE
An instance of a character tokenizer factory, which may be used wherever a character tokenizer factory is needed. |
| Constructor Summary | |
|---|---|
CharacterTokenizerFactory()
Deprecated. Use singleton instance INSTANCE instead. |
|
| Method Summary | |
|---|---|
void |
compileTo(ObjectOutput objOut)
Deprecated. Use Serializable interface instead. |
Tokenizer |
tokenizer(char[] ch,
int start,
int length)
Returns a character tokenizer for the specified character array slice. |
String |
toString()
Returns a string representation of this tokenizer factory, which is just its name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TokenizerFactory INSTANCE
@Deprecated public static final TokenizerFactory FACTORY
INSTANCE instead.INSTANCE.
| Constructor Detail |
|---|
@Deprecated public CharacterTokenizerFactory()
INSTANCE instead.
Implementation Note: All character tokenizer
factories behave the same way, and they are thread safe, so the
constant INSTANCE may be used anywhere a freshly
constructed character tokenizer factory is used, without loss
of performance.
| Method Detail |
|---|
public Tokenizer tokenizer(char[] ch,
int start,
int length)
tokenizer in interface TokenizerFactorych - Characters to tokenize.start - Index of first character to tokenize.length - Number of characters to tokenize.public String toString()
toString in class Object
@Deprecated
public void compileTo(ObjectOutput objOut)
throws IOException
Serializable interface instead.
FACTORY.
compileTo in interface CompilableobjOut - Object output to which this tokenizer factory is
compiled.
IOException - If there is an I/O error during the write.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||