@API(value=Internal) public final class StringUtils extends java.lang.Object
Strings,
CharSequences, etc.
These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isBlank(java.lang.String str)
Determine if the supplied
String is blank (i.e.,
null or consisting only of whitespace characters). |
static boolean |
isEmpty(java.lang.CharSequence charSequence)
Determine if the supplied
CharSequence is empty (i.e.,
null or zero-length). |
static boolean |
isNotBlank(java.lang.String str)
Determine if the supplied
String is not blank. |
static boolean |
isNotEmpty(java.lang.CharSequence charSequence)
Determine if the supplied
CharSequence is not empty. |
static java.lang.String |
nullSafeToString(java.lang.Class<?>... classes)
Generate a comma-separated list of class names for the supplied
classes.
|
public static boolean isEmpty(java.lang.CharSequence charSequence)
CharSequence is empty (i.e.,
null or zero-length).charSequence - the CharSequence to checktrue if the CharSequence is emptyisNotEmpty(CharSequence),
isBlank(String)public static boolean isNotEmpty(java.lang.CharSequence charSequence)
CharSequence is not empty.charSequence - the CharSequence to checktrue if the CharSequence is not emptyisEmpty(CharSequence),
isNotBlank(String)public static boolean isBlank(java.lang.String str)
String is blank (i.e.,
null or consisting only of whitespace characters).str - the string to checktrue if the string is blankisNotBlank(String),
isEmpty(CharSequence)public static boolean isNotBlank(java.lang.String str)
String is not blank.str - the string to checktrue if the string is not blankisBlank(String),
isEmpty(CharSequence)public static java.lang.String nullSafeToString(java.lang.Class<?>... classes)
classes - the classes whose names should be included in the
generated stringnull or empty