Package org.apache.lucene.tests.analysis
Class CannedTokenStream
java.lang.Object
org.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.apache.lucene.tests.analysis.CannedTokenStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
TokenStream from a canned list of Tokens.
-
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
ConstructorDescriptionCannedTokenStream
(int finalPosInc, int finalOffset, Token... tokens) If you want trailing holes, pass a non-zero finalPosInc.CannedTokenStream
(Token... tokens) -
Method Summary
Methods inherited from class org.apache.lucene.analysis.TokenStream
close
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
-
CannedTokenStream
-
CannedTokenStream
If you want trailing holes, pass a non-zero finalPosInc.
-
-
Method Details
-
end
- Overrides:
end
in classTokenStream
- Throws:
IOException
-
reset
- Overrides:
reset
in classTokenStream
- Throws:
IOException
-
incrementToken
public boolean incrementToken()- Specified by:
incrementToken
in classTokenStream
-