This project has retired. For details please refer to its Attic page.
TokenizerFactory.Builder (Apache Crunch 0.7.0 API)

org.apache.crunch.contrib.text
Class TokenizerFactory.Builder

java.lang.Object
  extended by org.apache.crunch.contrib.text.TokenizerFactory.Builder
Enclosing class:
TokenizerFactory

public static class TokenizerFactory.Builder
extends Object

A class for constructing new TokenizerFactory instances using the Builder pattern.


Constructor Summary
TokenizerFactory.Builder()
           
 
Method Summary
 TokenizerFactory build()
          Returns a new TokenizerFactory with settings determined by this Builder instance.
 TokenizerFactory.Builder delimiter(String delim)
          Sets the delimiter used by the TokenizerFactory instances constructed by this instance.
 TokenizerFactory.Builder drop(Integer... indices)
          Drop the specified fields found by the input scanner, counting from zero.
 TokenizerFactory.Builder keep(Integer... indices)
          Keep only the specified fields found by the input scanner, counting from zero.
 TokenizerFactory.Builder locale(Locale locale)
          Sets the Locale to use with the TokenizerFactory returned by this Builder instance.
 TokenizerFactory.Builder skip(String skip)
          Sets the regular expression that determines which input characters should be ignored by the Scanner that is returned by the constructed TokenizerFactory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenizerFactory.Builder

public TokenizerFactory.Builder()
Method Detail

delimiter

public TokenizerFactory.Builder delimiter(String delim)
Sets the delimiter used by the TokenizerFactory instances constructed by this instance.

Parameters:
delim - The delimiter to use, which may be a regular expression
Returns:
This Builder instance

skip

public TokenizerFactory.Builder skip(String skip)
Sets the regular expression that determines which input characters should be ignored by the Scanner that is returned by the constructed TokenizerFactory.

Parameters:
skip - The regular expression of input values to ignore
Returns:
This Builder instance

locale

public TokenizerFactory.Builder locale(Locale locale)
Sets the Locale to use with the TokenizerFactory returned by this Builder instance.

Parameters:
locale - The locale to use
Returns:
This Builder instance

keep

public TokenizerFactory.Builder keep(Integer... indices)
Keep only the specified fields found by the input scanner, counting from zero.

Parameters:
indices - The indices to keep
Returns:
This Builder instance

drop

public TokenizerFactory.Builder drop(Integer... indices)
Drop the specified fields found by the input scanner, counting from zero.

Parameters:
indices - The indices to drop
Returns:
This Builder instance

build

public TokenizerFactory build()
Returns a new TokenizerFactory with settings determined by this Builder instance.

Returns:
A new TokenizerFactory


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.