public static class Ensure.StringCondition extends Ensure.ObjectCondition
| Constructor and Description |
|---|
StringCondition(String value)
Creates a new instance of
StringCondition. |
| Modifier and Type | Method and Description |
|---|---|
void |
isNotBlank()
Ensures that the given string is not
null and contains at least one non-whitespace character. |
void |
isNotBlank(String explanation,
Object... args)
Ensures that the given string is not
null and contains at least one non-whitespace character. |
void |
isNotEmpty()
Ensures that the given string is not
null and contains at least one character. |
void |
isNotEmpty(String explanation,
Object... args)
Ensures that the given string is not
null and contains at least one character. |
isInstanceOf, isInstanceOf, isNotNull, isNotNull, isNull, isNullpublic StringCondition(@CheckForNull
String value)
StringCondition.value - value of the conditionpublic void isNotEmpty()
null and contains at least one character.AssertionError - if the string is empty (or null)@FormatMethod public void isNotEmpty(String explanation, Object... args)
null and contains at least one character.explanation - a formatted message explaining the assertionargs - Arguments referenced by the format specifiers in the formatted explanation. If there are more
arguments than format specifiers, the extra arguments are ignored. The number of arguments is
variable and may be zero.AssertionError - if the string is empty (or null)public void isNotBlank()
null and contains at least one non-whitespace character.AssertionError - if the string is empty (or null)@FormatMethod public void isNotBlank(String explanation, Object... args)
null and contains at least one non-whitespace character.explanation - a formatted message explaining the assertionargs - Arguments referenced by the format specifiers in the formatted explanation. If there are more
arguments than format specifiers, the extra arguments are ignored. The number of arguments is
variable and may be zero.AssertionError - if the string is empty (or null)Copyright © 2018. All rights reserved.