org.apache.lucene.analysis.miscellaneous

## Class SingleTokenTokenStream

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

All Implemented Interfaces:
  Closeable, AutoCloseable

    public final class SingleTokenTokenStream
    extends TokenStream

A `TokenStream` containing a single token.

### Nested Class Summary

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

`AttributeSource.AttributeFactory, AttributeSource.State`

### Constructor Summary

Constructors
Constructor and Description
`SingleTokenTokenStream(Token token)`

### Method Summary

Methods
`Token` `getToken()`
`boolean` `incrementToken()`
`void` `reset()`
`void` `setToken(Token token)`

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

`close, end`

### 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

#### SingleTokenTokenStream

    public SingleTokenTokenStream(Token token)

### Method Detail

#### incrementToken

    public final boolean incrementToken()

Specified by:
  `incrementToken` in class `TokenStream`

#### reset

    public void reset()

Overrides:
  `reset` in class `TokenStream`

#### getToken

    public Token getToken()

#### setToken

    public void setToken(Token token)