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
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
ConstructorDescriptionConcatenatingTokenStream
(TokenStream... sources) Create a new ConcatenatingTokenStream from a set of inputs -
Method Summary
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 Details
-
ConcatenatingTokenStream
Create a new ConcatenatingTokenStream from a set of inputs- Parameters:
sources
- an array of TokenStream inputs to concatenate
-
-
Method Details
-
incrementToken
- Specified by:
incrementToken
in classTokenStream
- Throws:
IOException
-
end
- Overrides:
end
in classTokenStream
- Throws:
IOException
-
reset
- Overrides:
reset
in classTokenStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classTokenStream
- Throws:
IOException
-