Class Analyzer.TokenStreamComponents

java.lang.Object
org.apache.lucene.analysis.Analyzer.TokenStreamComponents
Enclosing class:
Analyzer

public static final class Analyzer.TokenStreamComponents extends Object
This class encapsulates the outer components of a token stream. It provides access to the source (a Reader Consumer and the outer end (sink), an instance of TokenFilter which also serves as the TokenStream returned by Analyzer.tokenStream(String, Reader).
  • Field Details

  • Constructor Details

  • Method Details

    • setReader

      private void setReader(Reader reader)
      Resets the encapsulated components with the given reader. If the components cannot be reset, an Exception should be thrown.
      Parameters:
      reader - a reader to reset the source component
    • getTokenStream

      public TokenStream getTokenStream()
      Returns the sink TokenStream
      Returns:
      the sink TokenStream
    • getSource

      public Consumer<Reader> getSource()
      Returns the component's source