public final class MockRandomLookaheadTokenFilter extends LookaheadTokenFilter<LookaheadTokenFilter.Position>
LookaheadTokenFilter to randomly peek at future tokens.LookaheadTokenFilter.PositionAttributeSource.Stateend, inputPos, offsetAtt, outputPos, posIncAtt, positions, posLenAttinputDEFAULT_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, peekTokenclose, endaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic MockRandomLookaheadTokenFilter(Random random, TokenStream in)
public LookaheadTokenFilter.Position newPosition()
newPosition in class LookaheadTokenFilter<LookaheadTokenFilter.Position>protected void afterPosition()
throws IOException
LookaheadTokenFilterafterPosition in class LookaheadTokenFilter<LookaheadTokenFilter.Position>IOExceptionpublic boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class LookaheadTokenFilter<LookaheadTokenFilter.Position>IOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.