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

    java.lang.Object
      org.apache.lucene.util.AttributeSource
          org.apache.lucene.analysis.TokenStream
              org.apache.lucene.analysis.Tokenizer
                  org.apache.lucene.analysis.SinkTokenizer
                      org.apache.lucene.analysis.sinks.TokenTypeSinkTokenizer

Deprecated. Use `TokenTypeSinkFilter` and `TeeSinkTokenFilter` instead.

    public class TokenTypeSinkTokenizer

extends SinkTokenizer

If the `Token.type()` matches the passed in `typeToMatch` then add it to the sink

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
`AttributeSource.AttributeFactory, AttributeSource.State`

Field Summary

Fields inherited from class org.apache.lucene.analysis.SinkTokenizer
`iter, lst`

Fields inherited from class org.apache.lucene.analysis.Tokenizer
`input`

Constructor Summary
`TokenTypeSinkTokenizer(int initCap, java.lang.String typeToMatch)` Deprecated.
`TokenTypeSinkTokenizer(java.util.List input, java.lang.String typeToMatch)` Deprecated.
`TokenTypeSinkTokenizer(java.lang.String typeToMatch)` Deprecated.

Method Summary
`void` `add(Token t)` Deprecated. Override this method to cache only certain tokens, or new tokens based on the old tokens.

Methods inherited from class org.apache.lucene.analysis.SinkTokenizer
`close, getTokens, next, reset`

Methods inherited from class org.apache.lucene.analysis.Tokenizer
`correctOffset, reset`

Methods inherited from class org.apache.lucene.analysis.TokenStream
`end, getOnlyUseNewAPI, incrementToken, next, setOnlyUseNewAPI`

Methods inherited from class org.apache.lucene.util.AttributeSource
`addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString`

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

Constructor Detail

### TokenTypeSinkTokenizer

    public TokenTypeSinkTokenizer(java.lang.String typeToMatch)

  Deprecated.

### TokenTypeSinkTokenizer

    public TokenTypeSinkTokenizer(int initCap,
                                  java.lang.String typeToMatch)

  Deprecated.

### TokenTypeSinkTokenizer

    public TokenTypeSinkTokenizer(java.util.List input,
                                  java.lang.String typeToMatch)

  Deprecated.

Method Detail

### add

    public void add(Token t)

  Deprecated.
  Description copied from class: `SinkTokenizer`
  Override this method to cache only certain tokens, or new tokens based on the old tokens.

  Overrides:
    `add` in class `SinkTokenizer`
  Parameters:
    `t` - The `Token` to add to the sink

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