Class ConcatenatingTokenStream
- java.lang.Object
-
- org.apache.lucene.util.AttributeSource
-
- org.apache.lucene.analysis.TokenStream
-
- org.apache.lucene.analysis.miscellaneous.ConcatenatingTokenStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class ConcatenatingTokenStream extends TokenStream
A TokenStream that takes an array of input TokenStreams as sources, and concatenates them together.Offsets from the second and subsequent sources are incremented to behave as if all the inputs were from a single source.
All of the input TokenStreams must have the same attribute implementations
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.State
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.analysis.TokenStream
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
-
-
Constructor Summary
Constructors Constructor Description ConcatenatingTokenStream(TokenStream... sources)Create a new ConcatenatingTokenStream from a set of inputs
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidend()booleanincrementToken()voidreset()-
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
-
-
-
-
Constructor Detail
-
ConcatenatingTokenStream
public ConcatenatingTokenStream(TokenStream... sources)
Create a new ConcatenatingTokenStream from a set of inputs- Parameters:
sources- an array of TokenStream inputs to concatenate
-
-
Method Detail
-
incrementToken
public boolean incrementToken() throws IOException- Specified by:
incrementTokenin classTokenStream- Throws:
IOException
-
end
public void end() throws IOException- Overrides:
endin classTokenStream- Throws:
IOException
-
reset
public void reset() throws IOException- Overrides:
resetin classTokenStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classTokenStream- Throws:
IOException
-
-