Package org.apache.lucene.analysis
Class Analyzer.TokenStreamComponents
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer.TokenStreamComponents
-
- Enclosing class:
- Analyzer
public static class Analyzer.TokenStreamComponents extends java.lang.Object
This class encapsulates the outer components of a token stream. It provides access to the source (Tokenizer
) and the outer end (sink), an instance ofTokenFilter
which also serves as theTokenStream
returned byAnalyzer.tokenStream(String, Reader)
.
-
-
Constructor Summary
Constructors Constructor Description TokenStreamComponents(Tokenizer source)
Creates a newAnalyzer.TokenStreamComponents
instance.TokenStreamComponents(Tokenizer source, TokenStream result)
Creates a newAnalyzer.TokenStreamComponents
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tokenizer
getTokenizer()
Returns the component'sTokenizer
TokenStream
getTokenStream()
Returns the sinkTokenStream
-
-
-
Constructor Detail
-
TokenStreamComponents
public TokenStreamComponents(Tokenizer source, TokenStream result)
Creates a newAnalyzer.TokenStreamComponents
instance.- Parameters:
source
- the analyzer's tokenizerresult
- the analyzer's resulting token stream
-
TokenStreamComponents
public TokenStreamComponents(Tokenizer source)
Creates a newAnalyzer.TokenStreamComponents
instance.- Parameters:
source
- the analyzer's tokenizer
-
-
Method Detail
-
getTokenStream
public TokenStream getTokenStream()
Returns the sinkTokenStream
- Returns:
- the sink
TokenStream
-
-