@UtilityMarker public final class Utility extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
commonPrefix(String string1,
String string2) |
static String |
convertForComparison(String text)
Roughly converts database object names so that they can be compared with others in a
case-insensitive way.
|
static boolean |
hasNoUpperCase(String text)
Checks if the text is all lowercase.
|
static boolean |
isBlank(CharSequence text)
Checks if the text is null or empty.
|
static boolean |
isClassAvailable(String className)
Checks if a class is available on the classpath.
|
static boolean |
isIntegral(CharSequence text)
Checks if the text contains an integer only.
|
static String |
join(Collection<String> collection,
String separator) |
static String |
join(Map<?,?> map,
String separator) |
static String |
requireNotBlank(String text,
String message)
Checks if the text is null or empty, and throws an exception if it is.
|
static String |
stripEnd(String text) |
static String |
stripStart(String text) |
static String |
toSnakeCase(String identifier) |
static String |
trimToEmpty(String text) |
public static String convertForComparison(String text)
text - Text to convertpublic static boolean hasNoUpperCase(String text)
text - Text to check.public static boolean isBlank(CharSequence text)
text - Text to check.public static boolean isClassAvailable(String className)
className - Class to checkpublic static boolean isIntegral(CharSequence text)
text - Text to check.public static String join(Collection<String> collection, String separator)
public static String requireNotBlank(String text, String message)
text - Text to check.IllegalArgumentException - If the provided string is blankCopyright © 2000-2022 Sualeh Fatehi. All rights reserved.