org.apache.lucene.analysis.miscellaneous

## Class PrefixAndSuffixAwareTokenFilter

- java.lang.Object
- - org.apache.lucene.util.AttributeSource
  - - org.apache.lucene.analysis.TokenStream
    - - org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

-     public class PrefixAndSuffixAwareTokenFilter
      extends org.apache.lucene.analysis.TokenStream

  Links two `PrefixAwareTokenFilter`.

  NOTE: This filter might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource

      `org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrefixAndSuffixAwareTokenFilter(org.apache.lucene.analysis.TokenStream prefix, org.apache.lucene.analysis.TokenStream input, org.apache.lucene.analysis.TokenStream suffix)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `incrementToken()`
    `org.apache.lucene.analysis.Token` | `next()` Deprecated. Will be removed in Lucene 3.0. This method is final, as it should not be overridden. Delegates to the backwards compatibility layer.
    `org.apache.lucene.analysis.Token` | `next(org.apache.lucene.analysis.Token reusableToken)` Deprecated. Will be removed in Lucene 3.0. This method is final, as it should not be overridden. Delegates to the backwards compatibility layer.
    `void` | `reset()`
    `org.apache.lucene.analysis.Token` | `updateInputToken(org.apache.lucene.analysis.Token inputToken, org.apache.lucene.analysis.Token lastPrefixToken)`
    `org.apache.lucene.analysis.Token` | `updateSuffixToken(org.apache.lucene.analysis.Token suffixToken, org.apache.lucene.analysis.Token lastInputToken)`

    - ### Methods inherited from class org.apache.lucene.analysis.TokenStream

      `end, getOnlyUseNewAPI, setOnlyUseNewAPI`

    - ### Methods inherited from class org.apache.lucene.util.AttributeSource

      `addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PrefixAndSuffixAwareTokenFilter

          public PrefixAndSuffixAwareTokenFilter(org.apache.lucene.analysis.TokenStream prefix,
                                                 org.apache.lucene.analysis.TokenStream input,
                                                 org.apache.lucene.analysis.TokenStream suffix)

  - ### Method Detail

    - #### updateInputToken

          public org.apache.lucene.analysis.Token updateInputToken(org.apache.lucene.analysis.Token inputToken,
                                                                   org.apache.lucene.analysis.Token lastPrefixToken)

    - #### updateSuffixToken

          public org.apache.lucene.analysis.Token updateSuffixToken(org.apache.lucene.analysis.Token suffixToken,
                                                                    org.apache.lucene.analysis.Token lastInputToken)

    - #### incrementToken

          public final boolean incrementToken()
                                       throws java.io.IOException

      Overrides:
        `incrementToken` in class `org.apache.lucene.analysis.TokenStream`
      Throws:
        `java.io.IOException`

    - #### next

          public final org.apache.lucene.analysis.Token next(org.apache.lucene.analysis.Token reusableToken)
                                                      throws java.io.IOException

      Deprecated. Will be removed in Lucene 3.0. This method is final, as it should not be overridden. Delegates to the backwards compatibility layer.
      Overrides:
        `next` in class `org.apache.lucene.analysis.TokenStream`
      Throws:
        `java.io.IOException`

    - #### next

          public final org.apache.lucene.analysis.Token next()
                                                      throws java.io.IOException

      Deprecated. Will be removed in Lucene 3.0. This method is final, as it should not be overridden. Delegates to the backwards compatibility layer.
      Overrides:
        `next` in class `org.apache.lucene.analysis.TokenStream`
      Throws:
        `java.io.IOException`

    - #### reset

          public void reset()
                     throws java.io.IOException

      Overrides:
        `reset` in class `org.apache.lucene.analysis.TokenStream`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Overrides:
        `close` in class `org.apache.lucene.analysis.TokenStream`
      Throws:
        `java.io.IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.