|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fullspan.util.StringUtil
Static utility methods for strings (this class has a private constructor and cannot be instantiated).
| Field Summary | |
static java.lang.String[] |
EMPTY_STRING_ARRAY
A zero-element String array. |
| Method Summary | |
static java.lang.String |
concatStringParts(java.lang.String[] parts)
Concatenate a list of Strings into a single String |
static java.lang.String |
concatStringParts(java.lang.String[] parts,
java.lang.String separator)
Concatenate a list of Strings into a single String, separated by a given separator String. |
static java.lang.String |
getStringNoNull(java.lang.Object o)
Return the String value of the argument o. |
static java.lang.String[] |
getStringParts(java.lang.String text)
Splits a String into parts and returns an array of the parts. |
static java.lang.String[] |
getStringParts(java.lang.String text,
java.lang.String delim)
Splits a String into parts and returns an array of the parts. |
static java.lang.String[] |
getStringParts(java.lang.String text,
java.lang.String delim,
boolean returnDelims)
Splits a String into parts and returns an array of the parts. |
static java.lang.String |
getStringWithNull(java.lang.Object o)
Return the String value of the argument o. |
static java.lang.String |
getTrimmedStringNoNull(java.lang.Object o)
Return the whitespace-trimmed String value of o. |
static java.lang.String |
getTrimmedStringWithNull(java.lang.Object o)
Return the whitespace-trimmed String value of o. |
static boolean |
isEmpty(java.lang.Object o)
Check if the string is null or empty |
static boolean |
isEmptyTrimmed(java.lang.Object o)
Check if the string is null or empty |
static int |
parseIntSafe(java.lang.Object o)
|
static long |
parseLongSafe(java.lang.Object o)
|
static java.lang.String |
truncate(java.lang.String input,
int maxlen)
|
static java.lang.String |
truncate(java.lang.String input,
int maxlen,
java.lang.String marker)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String[] EMPTY_STRING_ARRAY
| Method Detail |
public static java.lang.String concatStringParts(java.lang.String[] parts)
parts - the strings to concatenate
public static java.lang.String concatStringParts(java.lang.String[] parts,
java.lang.String separator)
parts - the strings to concatenateseparator - the separator
public static java.lang.String[] getStringParts(java.lang.String text)
Equivalent to calling getStringParts(text, " \t\n\r\f")
text - the input String
getStringParts(String, String)
public static java.lang.String[] getStringParts(java.lang.String text,
java.lang.String delim)
Equivalent to calling getStringParts(text, delim, false)
text - the input Stringdelim - the delimiter String passed to the StringTokenizer to
split the input String
getStringParts(String, String, boolean)
public static java.lang.String[] getStringParts(java.lang.String text,
java.lang.String delim,
boolean returnDelims)
text - the input Stringdelim - the delimiter String passed to the StringTokenizer to
split the input StringreturnDelims - true to include the delimiters in the array of
returned Strings; false to not include the delimiters
public static boolean isEmpty(java.lang.Object o)
o - the object that will be tested
public static boolean isEmptyTrimmed(java.lang.Object o)
o - the object that will be tested
public static java.lang.String getStringNoNull(java.lang.Object o)
o - the Object whose String value will be returned
public static java.lang.String getTrimmedStringNoNull(java.lang.Object o)
o - the Object whose String value will be returned
public static java.lang.String getStringWithNull(java.lang.Object o)
o - the Object whose String value will be returned
public static java.lang.String getTrimmedStringWithNull(java.lang.Object o)
o - the object whose String value will be returned
String.trim()public static int parseIntSafe(java.lang.Object o)
public static long parseLongSafe(java.lang.Object o)
public static java.lang.String truncate(java.lang.String input,
int maxlen)
public static java.lang.String truncate(java.lang.String input,
int maxlen,
java.lang.String marker)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||