public final class CheckString
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.function.Consumer<java.lang.String> |
format(java.util.regex.Pattern pattern)
Check that the string's format matches the given pattern
|
static java.util.function.Consumer<java.lang.String> |
format(java.util.regex.Pattern pattern,
java.lang.String hint)
Check that the string's format matches the given pattern
|
static java.util.function.Consumer<java.lang.String> |
max(int max)
Check that the string contains no more than 'max' characters
|
static java.util.function.Consumer<java.lang.String> |
min(int min)
Check that the string contains at least 'min' characters
|
static java.util.function.Consumer<java.lang.String> |
notBlank()
Check that the string is not empty (string with whitespace characters only)
|
static java.util.function.Consumer<java.lang.String> |
notEmpty()
Check that the string is not empty (string with no characters)
|
public static java.util.function.Consumer<java.lang.String> notEmpty()
public static java.util.function.Consumer<java.lang.String> notBlank()
public static java.util.function.Consumer<java.lang.String> format(java.util.regex.Pattern pattern)
pattern - pattern specifying the string's formatpublic static java.util.function.Consumer<java.lang.String> format(java.util.regex.Pattern pattern,
java.lang.String hint)
pattern - pattern specifying the string's formathint - hint describing the patternpublic static java.util.function.Consumer<java.lang.String> min(int min)
min - minimum number of characterspublic static java.util.function.Consumer<java.lang.String> max(int max)
max - maximum number of characters