public final class MockRandomLookaheadTokenFilter extends LookaheadTokenFilter<LookaheadTokenFilter.Position>
LookaheadTokenFilter
to randomly peek at future tokens.LookaheadTokenFilter.Position
AttributeSource.State
end, inputPos, offsetAtt, outputPos, posIncAtt, positions, posLenAtt
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
MockRandomLookaheadTokenFilter(Random random,
TokenStream in) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterPosition()
This is called when all input tokens leaving a given
position have been returned.
|
boolean |
incrementToken() |
LookaheadTokenFilter.Position |
newPosition() |
void |
reset() |
insertToken, nextToken, peekToken
close, end
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public MockRandomLookaheadTokenFilter(Random random, TokenStream in)
public LookaheadTokenFilter.Position newPosition()
newPosition
in class LookaheadTokenFilter<LookaheadTokenFilter.Position>
protected void afterPosition() throws IOException
LookaheadTokenFilter
afterPosition
in class LookaheadTokenFilter<LookaheadTokenFilter.Position>
IOException
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void reset() throws IOException
reset
in class LookaheadTokenFilter<LookaheadTokenFilter.Position>
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.