public static class TokenizerFactory.Builder extends Object
TokenizerFactory
instances using the Builder pattern.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
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 . |
public TokenizerFactory.Builder delimiter(String delim)
TokenizerFactory
instances constructed by
this instance.delim
- The delimiter to use, which may be a regular expressionBuilder
instancepublic TokenizerFactory.Builder skip(String skip)
Scanner
that is returned by the constructed
TokenizerFactory
.skip
- The regular expression of input values to ignoreBuilder
instancepublic TokenizerFactory.Builder locale(Locale locale)
Locale
to use with the TokenizerFactory
returned by
this Builder
instance.locale
- The locale to useBuilder
instancepublic TokenizerFactory.Builder keep(Integer... indices)
indices
- The indices to keepBuilder
instancepublic TokenizerFactory.Builder drop(Integer... indices)
indices
- The indices to dropBuilder
instancepublic TokenizerFactory build()
TokenizerFactory
with settings determined by this
Builder
instance.TokenizerFactory
Copyright © 2016 The Apache Software Foundation. All rights reserved.