org.apache.lucene.analysis
public class SinkTokenizer extends Tokenizer
TeeTokenFilter| Modifier and Type | Field and Description |
|---|---|
protected Iterator |
iter |
protected List |
lst |
| Constructor and Description |
|---|
SinkTokenizer() |
SinkTokenizer(int initCap) |
SinkTokenizer(List input) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Token t)
Override this method to cache only certain tokens, or new tokens based
on the old tokens.
|
void |
close()
By default, closes the input Reader.
|
List |
getTokens()
Get the tokens in the internal List.
|
Token |
next()
Returns the next token out of the list of cached tokens
|
void |
reset()
Reset the internal data structures to the start at the front of the list of tokens.
|
nextpublic SinkTokenizer(List input)
public SinkTokenizer()
public SinkTokenizer(int initCap)
public List getTokens()
reset() method to be called in order for them
to be made available. Also, this Tokenizer does nothing to protect against ConcurrentModificationExceptions
in the case of adds happening while TokenStream.next(org.apache.lucene.analysis.Token) is being called.Tokenspublic Token next() throws IOException
next in class TokenStreamToken in the Sink.IOExceptionpublic void add(Token t)
t - The Token to add to the sinkpublic void close()
throws IOException
Tokenizerclose in class TokenizerIOExceptionpublic void reset()
throws IOException
TokenStream.next(Token)reset in class TokenStreamIOExceptionCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.