public abstract class FilteringTokenFilter extends TokenFilter
accept() and return a boolean if the current
token should be preserved. incrementToken() uses this method
to decide if a token should be passed to the caller.AttributeSource.StateinputDEFAULT_TOKEN_ATTRIBUTE_FACTORY| Constructor and Description |
|---|
FilteringTokenFilter(TokenStream in)
Create a new
FilteringTokenFilter. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
accept()
Override this method and return if the current input token should be returned by
incrementToken(). |
void |
end() |
boolean |
incrementToken() |
void |
reset() |
closeaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic FilteringTokenFilter(TokenStream in)
FilteringTokenFilter.in - the TokenStream to consumeprotected abstract boolean accept()
throws IOException
incrementToken().IOExceptionpublic final boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class TokenFilterIOExceptionpublic void end()
throws IOException
end in class TokenFilterIOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.