@API(value=Internal) public final class StringUtils extends 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(String str)
Determine if the supplied
String is blank (i.e.,
null or consisting only of whitespace characters). |
static boolean |
isNotBlank(String str)
|
static String |
nullSafeToString(Object obj)
Convert the supplied
Object to a String using the
following algorithm. |
public static boolean isBlank(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)public static boolean isNotBlank(String str)
str - the string to checktrue if the string is not blankisBlank(String)public static String nullSafeToString(Object obj)
Object to a String using the
following algorithm.
null, this method returns "null".Arrays#toString(...) variant will be used to convert it to a String.Arrays#deepToString(Object[])
will be used to convert it to a String.toString() on the object
will be returned.obj - the object to convert to a StringArrays.deepToString(Object[]),
ClassUtils.nullSafeToString(Class...)