|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.util.StringUtils
public class StringUtils
Utilities for String manipulation.
| Constructor Summary | |
|---|---|
StringUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
areStringsEqual(java.lang.String str1,
java.lang.String str2)
Utility to tell if two strings are the same. |
static java.lang.String |
booleanArrayToString(boolean[] ba)
Utility to convert a boolean[] to a String. |
static java.lang.String |
collectionToString(java.util.Collection coll)
Converts the given collection of objects to string as a comma-separated list. |
static int |
getIntValueForProperty(java.util.Properties props,
java.lang.String propName,
int defaultValue)
Convenience method to extract an integer property value from a Properties file. |
static java.lang.String |
intArrayToString(int[] ia)
Utility to convert an int[] to a String. |
static boolean |
isEmpty(java.lang.String s)
check string is null or length is 0. |
static boolean |
isValidJavaIdentifierForJDOQL(java.lang.String s)
Utility to check if a name is a valid Java identifier. |
static boolean |
isWhitespace(java.lang.String str)
Utility to check if a string is whitespace. |
static java.lang.String |
jdoFlagsToString(byte flags)
Utility to convert JDO specific flags to a String. |
static java.lang.String |
leftAlignedPaddedString(java.lang.String input,
int length)
Utility to return a left-aligned version of a string padded to the number of characters specified. |
static boolean |
notEmpty(java.lang.String s)
check string isnot null and length > 0. |
static java.lang.String |
objectArrayToString(java.lang.Object[] arr)
Utility to convert an Object[] to a String. |
static java.lang.String |
replaceAll(java.lang.String theString,
java.lang.String toReplace,
java.lang.String replacement)
Replaces each substring of this string that matches toReplace. |
static java.lang.String |
rightAlignedPaddedString(java.lang.String input,
int length)
Utility to return a right-aligned version of a string padded to the number of characters specified. |
static java.lang.String[] |
split(java.lang.String valuesString,
java.lang.String token)
Splits a list of values separated by a token |
static java.lang.String |
toJVMIDString(java.lang.Object obj)
Utility to convert an object to a JVM type string. |
| 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 java.lang.String replaceAll(java.lang.String theString,
java.lang.String toReplace,
java.lang.String replacement)
theString - The string to usetoReplace - The string to replace.replacement - The replacement string.
public static boolean isWhitespace(java.lang.String str)
str - The string to check
public static boolean areStringsEqual(java.lang.String str1,
java.lang.String str2)
str1 - The first stringstr2 - The second string
public static java.lang.String leftAlignedPaddedString(java.lang.String input,
int length)
input - The input stringlength - The length desired
public static java.lang.String rightAlignedPaddedString(java.lang.String input,
int length)
input - The input stringlength - The length desired
public static java.lang.String[] split(java.lang.String valuesString,
java.lang.String token)
valuesString - the text to be splitedtoken - the token
public static java.lang.String toJVMIDString(java.lang.Object obj)
obj - The object
public static java.lang.String booleanArrayToString(boolean[] ba)
ba - The boolean[]
public static java.lang.String intArrayToString(int[] ia)
ia - The int[]
public static java.lang.String objectArrayToString(java.lang.Object[] arr)
arr - The Object[]
public static java.lang.String collectionToString(java.util.Collection coll)
coll - collection of objects to be converted
public static java.lang.String jdoFlagsToString(byte flags)
flags - The JDO flags
public static boolean isValidJavaIdentifierForJDOQL(java.lang.String s)
s - The name
public static int getIntValueForProperty(java.util.Properties props,
java.lang.String propName,
int defaultValue)
props - The PropertiespropName - Name of the propertydefaultValue - The default value to use (in case not specified)
public static boolean isEmpty(java.lang.String s)
s - check string
public static boolean notEmpty(java.lang.String s)
s - check string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||