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

    public final class SingleTokenTokenStream

extends org.apache.lucene.analysis.TokenStream

A `TokenStream` containing a single token.

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
`SingleTokenTokenStream(org.apache.lucene.analysis.Token token)`

Method Summary
`org.apache.lucene.analysis.Token` `getToken()`
`boolean` `incrementToken()`
`void` `reset()`
`void` `setToken(org.apache.lucene.analysis.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, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SingleTokenTokenStream

    public SingleTokenTokenStream(org.apache.lucene.analysis.Token token)

Method Detail

### incrementToken

    public final boolean incrementToken()
                                 throws IOException

  Specified by:
    `incrementToken` in class `org.apache.lucene.analysis.TokenStream`
  Throws:
    `IOException`

### reset

    public void reset()
               throws IOException

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

### getToken

    public org.apache.lucene.analysis.Token getToken()

### setToken

    public void setToken(org.apache.lucene.analysis.Token token)

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