Package org.apache.lucene.analysis.sinks
Class TokenRangeSinkFilter
- java.lang.Object
-
- org.apache.lucene.analysis.sinks.TeeSinkTokenFilter.SinkFilter
-
- org.apache.lucene.analysis.sinks.TokenRangeSinkFilter
-
public class TokenRangeSinkFilter extends TeeSinkTokenFilter.SinkFilter
Counts the tokens as they go by and saves to the internal list those between the range of lower and upper, exclusive of upper
-
-
Constructor Summary
Constructors Constructor Description TokenRangeSinkFilter(int lower, int upper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(AttributeSource source)Returns true, iff the current state of the passed-inAttributeSourceshall be stored in the sink.voidreset()Called byTeeSinkTokenFilter.SinkTokenStream.reset().
-
-
-
Method Detail
-
accept
public boolean accept(AttributeSource source)
Description copied from class:TeeSinkTokenFilter.SinkFilterReturns true, iff the current state of the passed-inAttributeSourceshall be stored in the sink.- Specified by:
acceptin classTeeSinkTokenFilter.SinkFilter
-
reset
public void reset() throws IOExceptionDescription copied from class:TeeSinkTokenFilter.SinkFilterCalled byTeeSinkTokenFilter.SinkTokenStream.reset(). This method does nothing by default and can optionally be overridden.- Overrides:
resetin classTeeSinkTokenFilter.SinkFilter- Throws:
IOException
-
-