|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.makumba.commons.StringUtils
public class StringUtils
This class provides utility methods for String manipulation.
Constructor Summary | |
---|---|
StringUtils()
|
Method Summary | |
---|---|
static boolean |
allNotEmpty(String[] o)
|
static boolean |
anyNotEmpty(String[] o)
|
static String[] |
append(String[] functionNames,
String toAppend)
|
static String |
concatAsString(Collection<?> collection)
|
static String |
concatAsString(Collection<?> collection,
String delim)
|
static String |
concatAsString(Object[] array)
|
static String |
concatAsString(Object[] array,
String delim)
|
static boolean |
endsWith(String s,
String[] options)
Checks whether the given String ends with any of the given options. |
static boolean |
equals(Object o,
String s)
Checks whether the given Object equals the given String. |
static boolean |
equals(String s,
Object o)
Checks whether the given Object equals the given String. |
static boolean |
equalsAny(Object o,
String... options)
Checks whether the given Object equals any of the given options. |
static boolean |
equalsAny(String s,
String... options)
Checks whether the given String equals any of the given options. |
static String |
getAbsolutePath(String requestURI,
String page)
|
static String |
getExceptionStackTrace(Exception e)
|
static String |
getParam(String paramName,
String queryString)
Fetches a param out of a typical param string found in HTML tags |
static String |
getStartsWith(String s,
String[] options)
|
static boolean |
isEmpty(Object o)
Checks whether an Object is null or has, after trimming, a length == 0. |
static String |
lowerCaseBeginning(String s)
Returns a string with lower-cased first letter. |
static boolean |
notEmpty(Object o)
Checks whether a String is not null and has, after trimming, a length > 0. |
static String |
removeRedundantSpaces(String s)
|
static String |
removeSingleQuote(String s)
Removes single quotes, if the string is starting and ending with the single quote character. |
static String |
reverseString(String s)
|
static boolean |
startsWith(String s,
String[] options)
Checks whether the given String starts with any of the given options. |
static int |
toInt(String str,
int defaultValue)
Convert a String to an int , returning a default value if the conversion fails or if the
string is null . |
static String |
toString(Collection<?> collection)
|
static String |
toString(Collection<?> collection,
boolean frame)
|
static String |
toString(Collection<?> collection,
boolean frame,
String delimeter)
|
static String |
toString(Enumeration<?> enumeration)
|
static String |
toString(Object[] array)
Converts an array to a String represenation, using the toString() method of each array element. |
static String |
toString(Object[] array,
boolean frame)
|
static String |
toString(Object[] array,
boolean frame,
String delimeter)
|
static String |
toString(Object[] array,
String delimeter)
|
static String |
upperCaseBeginning(String s)
Returns a string with upper-cased first letter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtils()
Method Detail |
---|
public static String lowerCaseBeginning(String s)
public static String upperCaseBeginning(String s)
public static boolean notEmpty(Object o)
public static boolean anyNotEmpty(String[] o)
public static boolean allNotEmpty(String[] o)
public static boolean isEmpty(Object o)
public static String toString(Object[] array)
public static String toString(Object[] array, String delimeter)
public static String toString(Object[] array, boolean frame)
public static String toString(Object[] array, boolean frame, String delimeter)
public static String toString(Collection<?> collection, boolean frame, String delimeter)
public static String toString(Collection<?> collection, boolean frame)
public static String toString(Collection<?> collection)
public static String concatAsString(Collection<?> collection)
public static String concatAsString(Collection<?> collection, String delim)
public static String concatAsString(Object[] array)
public static String concatAsString(Object[] array, String delim)
public static boolean equals(String s, Object o)
public static boolean equals(Object o, String s)
public static boolean equalsAny(Object o, String... options)
public static boolean equalsAny(String s, String... options)
public static boolean startsWith(String s, String[] options)
public static String getStartsWith(String s, String[] options)
public static boolean endsWith(String s, String[] options)
public static int toInt(String str, int defaultValue)
String
to an int
, returning a default value if the conversion fails or if the
string is null
.
public static String toString(Enumeration<?> enumeration)
public static String[] append(String[] functionNames, String toAppend)
public static String getParam(String paramName, String queryString)
paramName
- the name of the paramqueryString
- the string to search within
public static String getAbsolutePath(String requestURI, String page)
public static String reverseString(String s)
public static String getExceptionStackTrace(Exception e)
public static String removeRedundantSpaces(String s)
public static String removeSingleQuote(String s)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |