public static final class Analyzer.TokenStreamComponents extends Object
Reader
Consumer
and the outer end (sink), an
instance of TokenFilter
which also serves as the
TokenStream
returned by
Analyzer.tokenStream(String, Reader)
.Modifier and Type | Field and Description |
---|---|
protected TokenStream |
sink
Sink tokenstream, such as the outer tokenfilter decorating
the chain.
|
protected Consumer<Reader> |
source
Original source of the tokens.
|
Constructor and Description |
---|
TokenStreamComponents(Consumer<Reader> source,
TokenStream result)
Creates a new
Analyzer.TokenStreamComponents instance. |
TokenStreamComponents(Tokenizer tokenizer)
Creates a new
Analyzer.TokenStreamComponents from a Tokenizer |
TokenStreamComponents(Tokenizer tokenizer,
TokenStream result)
Creates a new
Analyzer.TokenStreamComponents instance |
Modifier and Type | Method and Description |
---|---|
Consumer<Reader> |
getSource()
Returns the component's source
|
TokenStream |
getTokenStream()
Returns the sink
TokenStream |
protected final TokenStream sink
public TokenStreamComponents(Consumer<Reader> source, TokenStream result)
Analyzer.TokenStreamComponents
instance.source
- the source to set the reader onresult
- the analyzer's resulting token streampublic TokenStreamComponents(Tokenizer tokenizer, TokenStream result)
Analyzer.TokenStreamComponents
instancetokenizer
- the analyzer's Tokenizerresult
- the analyzer's resulting token streampublic TokenStreamComponents(Tokenizer tokenizer)
Analyzer.TokenStreamComponents
from a Tokenizerpublic TokenStream getTokenStream()
TokenStream
TokenStream
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.