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, toString
public 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.TokenStream
IOException
public void reset() throws IOException
reset
in class org.apache.lucene.analysis.TokenStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.lucene.analysis.TokenStream
IOException
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.