|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
public static class ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream. It provides
access to the source (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)
.
Field Summary | |
---|---|
protected TokenStream |
sink
|
protected Tokenizer |
source
|
Constructor Summary | |
---|---|
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance. |
|
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source,
TokenStream result)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance. |
Method Summary | |
---|---|
protected TokenStream |
getTokenStream()
Returns the sink TokenStream |
protected boolean |
reset(Reader reader)
Resets the encapsulated components with the given reader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Tokenizer source
protected final TokenStream sink
Constructor Detail |
---|
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 tokenizerMethod Detail |
---|
protected 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 component
true
if the components were reset, otherwise
false
IOException
- if the component's reset method throws an IOException
protected TokenStream getTokenStream()
TokenStream
TokenStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |