## org.apache.lucene.analysis.sinks
Class TokenRangeSinkFilter

    java.lang.Object
      org.apache.lucene.analysis.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
`TokenRangeSinkFilter(int lower, int upper)`

Method Summary
`boolean` `accept(AttributeSource source)` Returns true, iff the current state of the passed-in `AttributeSource` shall be stored in the sink.
`void` `reset()` Called by `TeeSinkTokenFilter.SinkTokenStream.reset()`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TokenRangeSinkFilter

    public TokenRangeSinkFilter(int lower,
                                int upper)

Method Detail

### accept

    public boolean accept(AttributeSource source)

  Description copied from class: `TeeSinkTokenFilter.SinkFilter`
  Returns true, iff the current state of the passed-in `AttributeSource` shall be stored in the sink.

  Specified by:
    `accept` in class `TeeSinkTokenFilter.SinkFilter`

### reset

    public void reset()
               throws java.io.IOException

  Description copied from class: `TeeSinkTokenFilter.SinkFilter`
  Called by `TeeSinkTokenFilter.SinkTokenStream.reset()`. This method does nothing by default and can optionally be overridden.

  Overrides:
    `reset` in class `TeeSinkTokenFilter.SinkFilter`
  Throws:
    `java.io.IOException`

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.