com.twitter.common.text.filter
Class TokenTypeFilter.Builder

java.lang.Object
  extended by com.twitter.common.text.filter.TokenTypeFilter.Builder
Enclosing class:
TokenTypeFilter

public static final class TokenTypeFilter.Builder
extends Object


Constructor Summary
TokenTypeFilter.Builder(TokenStream inputStream)
           
 
Method Summary
 TokenTypeFilter build()
           
 TokenTypeFilter.Builder setMode(TokenTypeFilter.Mode mode)
          Selects whether to accept tokens of the specified types or reject them.
 TokenTypeFilter.Builder setTypesToFilter(TokenType... types)
          Sets token types to accept or filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenTypeFilter.Builder

public TokenTypeFilter.Builder(TokenStream inputStream)
Method Detail

setTypesToFilter

public TokenTypeFilter.Builder setTypesToFilter(TokenType... types)
Sets token types to accept or filter.

Parameters:
types - token types to accept or filter
Returns:
this Builder object

setMode

public TokenTypeFilter.Builder setMode(TokenTypeFilter.Mode mode)
Selects whether to accept tokens of the specified types or reject them.

Parameters:
mode - Mode.ACCEPT or Mode.REJECT
Returns:
this Builder object

build

public TokenTypeFilter build()