public final class SingletonTokenStream
extends org.apache.lucene.analysis.TokenStream
SingletonTokenStream implements a token stream that wraps a
 single value with a given property type. The property type is stored as a
 payload on the single returned token.| Constructor and Description | 
|---|
SingletonTokenStream(String value,
                    int type)
Creates a new SingleTokenStream with the given value and a property
  
type. | 
SingletonTokenStream(String value,
                    org.apache.lucene.index.Payload payload)
Creates a new SingleTokenStream with the given value and payload. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close() | 
boolean | 
incrementToken()  | 
void | 
reset() | 
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toStringpublic SingletonTokenStream(String value, org.apache.lucene.index.Payload payload)
value - the string value that will be returned with the token.payload - the payload that will be attached to this tokenpublic SingletonTokenStream(String value, int type)
type.value - the string value that will be returned with the token.type - the JCR property type.public boolean incrementToken()
                       throws IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic void reset()
           throws IOException
reset in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.lucene.analysis.TokenStreamIOExceptionCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.