public final class Strings extends Object
Constructor and Description |
---|
Strings() |
Modifier and Type | Method and Description |
---|---|
static String |
implode(Collection<?> objects,
String delimiter)
Generates a string which contains all string values of the specified collection, separated by the given delimiter.
|
static boolean |
isEmpty(String string)
Checks whether or not the specified string is empty.
|
static boolean |
notEmpty(String string)
Checks whether or not the specified string is not empty.
|
static String |
notNull(String string)
Returns the specified string, or an empty string if the specified string is
null . |
@NotNull public static String notNull(@Nullable String string)
null
.string
- the string which could be nullpublic static boolean isEmpty(@Nullable String string)
string
- the string to be checked for emptinesspublic static boolean notEmpty(@Nullable String string)
string
- the string to be checked for emptinesspublic static String implode(@NotNull Collection<?> objects, @NotNull String delimiter)
objects
- the objects to get an imploded string representation from.delimiter
- the delimiter to use for string creation.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210