Package org.apache.lucene.tests.index
Class BaseTermVectorsFormatTestCase.RandomTokenStream
java.lang.Object
org.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.apache.lucene.tests.index.BaseTermVectorsFormatTestCase.RandomTokenStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
BaseTermVectorsFormatTestCase
Produces a random TokenStream based off of provided terms.
-
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
ConstructorsConstructorDescriptionRandomTokenStream(int len, String[] sampleTerms, BytesRef[] sampleTermBytes) -
Method Summary
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, endMethods 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
-
RandomTokenStream
-
-
Method Details
-
randomPayload
-
hasPayloads
public boolean hasPayloads() -
getTerms
-
getTermBytes
-
getPositionsIncrements
public int[] getPositionsIncrements() -
getStartOffsets
public int[] getStartOffsets() -
getEndOffsets
public int[] getEndOffsets() -
getPayloads
-
reset
- Overrides:
resetin classTokenStream- Throws:
IOException
-
incrementToken
- Specified by:
incrementTokenin classTokenStream- Throws:
IOException
-