@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(Class<?>... classes)
Generate a comma-separated list of fully qualified class names for the
supplied classes.
|
static String |
nullSafeToString(Function<? super Class<?>,? extends String> mapper,
Class<?>... classes)
Generate a comma-separated list of mapped values for the supplied classes.
|
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(Class<?>... classes)
classes - the classes whose names should be included in the
generated stringnull or emptynullSafeToString(Function, Class...)public static String nullSafeToString(Function<? super Class<?>,? extends String> mapper, Class<?>... classes)
The values are generated by the supplied mapper
(e.g., Class::getName, Class::getSimpleName, etc.), unless
a class reference is null in which case it will be mapped to
"null".
mapper - the mapper to useclasses - the classes to mapnull or emptynullSafeToString(Class...)