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