public final class StringUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StringUtils.ToString<X> |
Modifier and Type | Method and Description |
---|---|
static String |
capitalizeFirst(String str) |
static String |
compact(String name)
Remove repeating strings that are appearing in the name.
|
static String |
deCapitalizeFirst(String str) |
static String |
getPrefix(Iterable<String> items) |
static <T> String |
getPrefix(Iterable<T> items,
Function<T,String> function) |
static int |
indexOfAlphabetic(String str) |
static boolean |
isNullOrEmpty(String str) |
static <T> String |
join(Iterable<T> items,
Function<T,String> function,
String delimiter) |
static <T> String |
join(Iterable<T> items,
String delimiter) |
static <T> String |
join(T[] items,
Function<T,String> function,
String delimiter) |
static <T> String |
join(T[] items,
String delimiter) |
static String |
loadResource(String resourceName) |
static String |
loadResource(URL resourceUrl) |
static String |
loadResourceQuietly(String resourceName) |
static String |
loadResourceQuietly(URL resourceUrl) |
static String |
prefixKeywords(String name)
Adds an underscore to the specified String, if its a Java Keyword.
|
static String |
toFieldName(String name)
Converts the string into a safe field name.
|
static String |
toPojoName(String name,
String prefix,
String suffix)
Converts a name of an interface or abstract class to Pojo name.
|
public static boolean isNullOrEmpty(String str)
public static int indexOfAlphabetic(String str)
public static <T> String join(Iterable<T> items, Function<T,String> function, String delimiter)
public static String loadResource(String resourceName) throws IOException
IOException
public static String loadResource(URL resourceUrl) throws IOException
IOException
public static final String compact(String name)
name
- The name to compact.public static final String prefixKeywords(String name)
name
- The specified string.public static final String toFieldName(String name)
name
- The field name.public static final String toPojoName(String name, String prefix, String suffix)
name
- The name to convert.prefix
- The prefix to use if needed.suffix
- The suffix to user if needed.Copyright © 2019 JBoss by Red Hat. All rights reserved.