| Modifier and Type | Method and Description |
|---|---|
static String |
arrayToDelimitedString(Object[] arr,
String delim)
Convert a
String array into a delimited String (e.g. |
static String |
collectionToDelimitedString(Collection<?> coll,
String delim,
String prefix,
String suffix)
Convert a
Collection to a delimited String (e.g. |
static boolean |
isEmpty(CharSequence cs)
Checks if a CharSequence has a length of 0 or null.
|
static boolean |
isEmpty(String cs)
Checks if a String is empty or null.
|
static boolean |
isNotEmpty(CharSequence cs)
Checks if a CharSequence has a non-zero length and is not null.
|
static boolean |
isNotEmpty(String cs)
Checks if a String is not empty and not null.
|
static String |
string(double n)
Convert
double to String. |
static double |
toDouble(String s)
Convert
String to double. |
public static boolean isEmpty(String cs)
cs - the char sequenceString.isEmpty()public static boolean isEmpty(CharSequence cs)
cs - the char sequenceCharSequence.length()public static boolean isNotEmpty(String cs)
cs - the char sequenceString.isEmpty()public static boolean isNotEmpty(CharSequence cs)
cs - the char sequenceCharSequence.length()public static String string(double n)
n - the double.npublic static double toDouble(String s)
String to double. If s is +inf/-inf, returns positive/negative
infinity. If s is +nan/-nan, returns NaN.s - string representation of the numberdouble value.public static String arrayToDelimitedString(Object[] arr, String delim)
String array into a delimited String (e.g. CSV).
Useful for toString() implementations.
arr - the array to displaydelim - the delimiter to use (typically a ",")Stringpublic static String collectionToDelimitedString(Collection<?> coll, String delim, String prefix, String suffix)
coll - the Collection to convertdelim - the delimiter to use (typically a ",")prefix - the String to start each element withsuffix - the String to end each element withStringCopyright © 2021 lettuce.io. All rights reserved.