public static class AllowedCharacters.Builder extends Object
AllowedCharacters.| Constructor and Description |
|---|
Builder()
Creates a new builder.
|
Builder(AllowedCharacters original)
Initializes the builder with an existing
AllowedCharacters
object. |
| Modifier and Type | Method and Description |
|---|---|
AllowedCharacters.Builder |
allow(char c)
Allow the given character.
|
AllowedCharacters.Builder |
allow(int from,
int to)
Allow characters within the given range.
|
AllowedCharacters.Builder |
allow(String characters)
Allow all the characters in the given string.
|
AllowedCharacters.Builder |
allowAll()
Allow all characters.
|
AllowedCharacters.Builder |
allowNonAscii()
Allows all characters outside the range of 7-bit ASCII.
|
AllowedCharacters.Builder |
allowPrintable()
Allows all characters that are considered "printable" (32-126
inclusive).
|
AllowedCharacters |
build()
Constructs the final
AllowedCharacters object. |
AllowedCharacters.Builder |
except(char c)
Reject the given character.
|
AllowedCharacters.Builder |
except(String characters)
Reject all the characters in the given string.
|
public Builder()
public Builder(AllowedCharacters original)
AllowedCharacters
object.original - the object to copypublic AllowedCharacters.Builder allowAll()
public AllowedCharacters.Builder allow(int from, int to)
from - the character to start atto - the character to end at (inclusive)public AllowedCharacters.Builder allow(String characters)
characters - the string containing the allowable characterspublic AllowedCharacters.Builder allow(char c)
c - the characterpublic AllowedCharacters.Builder allowPrintable()
public AllowedCharacters.Builder allowNonAscii()
public AllowedCharacters.Builder except(String characters)
characters - the string containing the illegal characterspublic AllowedCharacters.Builder except(char c)
c - the characterpublic AllowedCharacters build()
AllowedCharacters object.Copyright © 2016–2018 Michael Angstadt. All rights reserved.