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

All Implemented Interfaces:
  Closeable, AutoCloseable

    public class PrefixAndSuffixAwareTokenFilter
    extends 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

`AttributeSource.AttributeFactory, AttributeSource.State`

### Constructor Summary

Constructors
Constructor and Description
`PrefixAndSuffixAwareTokenFilter(TokenStream prefix, TokenStream input, TokenStream suffix)`

### Method Summary

Methods
`void` `close()`
`void` `end()`
`boolean` `incrementToken()`
`void` `reset()`
`Token` `updateInputToken(Token inputToken, Token lastPrefixToken)`
`Token` `updateSuffixToken(Token suffixToken, Token lastInputToken)`

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

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

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

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

### Constructor Detail

#### PrefixAndSuffixAwareTokenFilter

    public PrefixAndSuffixAwareTokenFilter(TokenStream prefix,
                                   TokenStream input,
                                   TokenStream suffix)

### Method Detail

#### updateInputToken

    public Token updateInputToken(Token inputToken,
                         Token lastPrefixToken)

#### updateSuffixToken

    public Token updateSuffixToken(Token suffixToken,
                          Token lastInputToken)

#### incrementToken

    public final boolean incrementToken()
                                 throws IOException

Specified by:
  `incrementToken` in class `TokenStream`
Throws:
  `IOException`

#### reset

    public void reset()
               throws IOException

Overrides:
  `reset` in class `TokenStream`
Throws:
  `IOException`

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Overrides:
  `close` in class `TokenStream`
Throws:
  `IOException`

#### end

    public void end()
             throws IOException

Overrides:
  `end` in class `TokenStream`
Throws:
  `IOException`