|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.util.StringUtil
Various utility string methods.
Constructor Summary | |
StringUtil()
|
Method Summary | |
static java.lang.String |
arrayToString(java.lang.Object[] array)
Returns a String with all the toString values(comma separated) from the given array. |
static java.lang.String |
baseClassName(java.lang.String clsName)
Returns the base class name without the package name for the given class name. |
static java.lang.String |
classVarName(java.lang.String clsName)
Returns a class variable name based on the given class name. |
static boolean |
contains(java.lang.String searchString,
java.lang.String targetString)
Returns true if the given searchString is found in the targetString. |
static boolean |
differ(java.lang.String x,
java.lang.String y)
Utility method to compare two strings (either of which can be null) and indicate if they differ. |
static java.lang.String |
identityString(java.lang.Object obj)
Returns an identity string for the given object for diagnostics. |
static java.lang.String |
nullIfBlank(java.lang.String s)
Returns null if given String is blank or empty(length=0) else returns given String. |
static java.lang.String |
packageName(java.lang.String clsName)
Returns the package name for the given class name. |
static java.lang.String[] |
stringToArray(java.lang.String s)
Takes a string of comma separated names and returns as an array of strings. |
static java.lang.String[] |
stringToArray(java.lang.String s,
int extraSpace)
Returns an String array from the given String of comma separated names. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringUtil()
Method Detail |
public static boolean differ(java.lang.String x, java.lang.String y)
public static java.lang.String nullIfBlank(java.lang.String s)
public static java.lang.String baseClassName(java.lang.String clsName)
public static java.lang.String packageName(java.lang.String clsName)
public static java.lang.String classVarName(java.lang.String clsName)
public static java.lang.String arrayToString(java.lang.Object[] array)
public static java.lang.String[] stringToArray(java.lang.String s, int extraSpace)
public static java.lang.String[] stringToArray(java.lang.String s)
public static boolean contains(java.lang.String searchString, java.lang.String targetString)
public static java.lang.String identityString(java.lang.Object obj)
obj
- the object to return the identity string for
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |