public static class ReusableAnalyzerBase.TokenStreamComponents extends Object
Tokenizer) and the outer end (sink), an
instance of TokenFilter which also serves as the
TokenStream returned by
Analyzer.tokenStream(String, Reader) and
Analyzer.reusableTokenStream(String, Reader).| Modifier and Type | Field and Description |
|---|---|
protected TokenStream |
sink |
protected Tokenizer |
source |
| Constructor and Description |
|---|
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source)
Creates a new
ReusableAnalyzerBase.TokenStreamComponents instance. |
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source,
TokenStream result)
Creates a new
ReusableAnalyzerBase.TokenStreamComponents instance. |
| Modifier and Type | Method and Description |
|---|---|
protected TokenStream |
getTokenStream()
Returns the sink
TokenStream |
protected boolean |
reset(Reader reader)
Resets the encapsulated components with the given reader.
|
protected final Tokenizer source
protected final TokenStream sink
public ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source, TokenStream result)
ReusableAnalyzerBase.TokenStreamComponents instance.source - the analyzer's tokenizerresult - the analyzer's resulting token streampublic ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source)
ReusableAnalyzerBase.TokenStreamComponents instance.source - the analyzer's tokenizerprotected boolean reset(Reader reader) throws IOException
true indicating that the components have
been reset successfully. Subclasses of ReusableAnalyzerBase might use
their own ReusableAnalyzerBase.TokenStreamComponents returning false if
the components cannot be reset.reader - a reader to reset the source componenttrue if the components were reset, otherwise
falseIOException - if the component's reset method throws an IOExceptionprotected TokenStream getTokenStream()
TokenStreamTokenStream