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 void
close()
void
end()
boolean
incrementToken()
void
reset()
-
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:
incrementToken
in classTokenStream
- Throws:
IOException
-
end
public void end() throws IOException
- Overrides:
end
in classTokenStream
- Throws:
IOException
-
reset
public void reset() throws IOException
- Overrides:
reset
in classTokenStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classTokenStream
- Throws:
IOException
-
-