public final class PositionFilter extends TokenFilter
AttributeSource.AttributeFactory, AttributeSource.Stateinput| Constructor and Description |
|---|
PositionFilter(TokenStream input)
Constructs a PositionFilter that assigns a position increment of zero to
all but the first token from the given input stream.
|
PositionFilter(TokenStream input,
int positionIncrement)
Constructs a PositionFilter that assigns the given position increment to
all but the first token from the given input stream.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
incrementToken() |
void |
reset() |
close, endaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreStatepublic PositionFilter(TokenStream input)
input - the input streampublic PositionFilter(TokenStream input, int positionIncrement)
input - the input streampositionIncrement - position increment to assign to all but the first
token from the input streampublic final boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class TokenFilterIOExceptionCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.