public class TokenizerFactory extends Object implements Serializable
Tokenizer
instances for input strings that use a fixed
set of delimiters, skip patterns, locales, and sets of indices to keep or drop.Modifier and Type | Class and Description |
---|---|
static class |
TokenizerFactory.Builder
A class for constructing new
TokenizerFactory instances using the Builder pattern. |
Modifier and Type | Method and Description |
---|---|
static TokenizerFactory.Builder |
builder()
Factory method for creating a
TokenizerFactory.Builder instance. |
Tokenizer |
create(String input)
Return a
Scanner instance that wraps the input string and uses the delimiter,
skip, and locale settings for this TokenizerFactory instance. |
static TokenizerFactory |
getDefaultInstance()
Returns a default
TokenizerFactory that uses whitespace as a delimiter and does
not skip any input fields. |
public static TokenizerFactory getDefaultInstance()
TokenizerFactory
that uses whitespace as a delimiter and does
not skip any input fields.TokenizerFactory
public Tokenizer create(String input)
Scanner
instance that wraps the input string and uses the delimiter,
skip, and locale settings for this TokenizerFactory
instance.input
- The input stringScanner
instance with appropriate settingspublic static TokenizerFactory.Builder builder()
TokenizerFactory.Builder
instance.TokenizerFactory.Builder
Copyright © 2016 The Apache Software Foundation. All rights reserved.