public class StringsUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EMPTY
An empty string constant
|
static int |
listBorder
Controls the formatting of lists of objects.
|
static int |
listMax
Controls the formatting of lists of objects.
|
Constructor and Description |
---|
StringsUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isEjbQlIdentifier(String s)
Check whether the given String is an identifier according to the EJB-QL definition.
|
static boolean |
isEmpty(String string)
Check if the given string is empty or null
|
static boolean |
isJavaKeyword(String s)
Check whether the given String is a reserved Java Keyword according to the Java Language
Specifications.
|
static boolean |
isValidJavaIdentifier(String s)
Check whether the given String is a valid identifier according to the Java Language
specifications.
|
static void |
toByteArray(ByteArrayOutputStream output,
String str)
Provides a Java string literal representing the parameter string.
|
static String |
toString(Hashtable table)
Provides a string representation of a hash table of objects.
|
static String |
toString(Object obj)
Provides a string representation of an object.
|
static String |
toString(String str)
Provides a Java string literal representing the parameter string.
|
static void |
toString(StringBuffer output,
boolean[] tab)
Provides a string representation of an array of booleans.
|
static void |
toString(StringBuffer output,
byte[] tab)
Provides a string representation of an array of bytes.
|
static void |
toString(StringBuffer output,
char[] tab)
Provides a string representation of an array of chars.
|
static void |
toString(StringBuffer output,
double[] tab)
Provides a string representation of an array of doubles.
|
static void |
toString(StringBuffer output,
float[] tab)
Provides a string representation of an array of floats.
|
static void |
toString(StringBuffer output,
Hashtable table)
Provides a string representation of a hash table of objects.
|
static void |
toString(StringBuffer output,
int[] tab)
Provides a string representation of an array of ints.
|
static void |
toString(StringBuffer output,
long[] tab)
Provides a string representation of an array of longs.
|
static void |
toString(StringBuffer output,
Object obj)
Provides a string representation of an object.
|
static void |
toString(StringBuffer output,
Object obj,
Class type)
Provides a string representation of an array.
|
static void |
toString(StringBuffer output,
short[] tab)
Provides a string representation of an array of shorts.
|
static void |
toString(StringBuffer output,
String str)
Provides a Java string literal representing the parameter string.
|
static void |
toString(StringBuffer output,
Vector vector)
Provides a string representation of a vector of objects.
|
static String |
toString(Vector vector)
Provides a string representation of a vector of objects.
|
static String |
toStringArray(Object tab)
Provides a string representation of an array.
|
static void |
toStringArray(StringBuffer output,
Object tab)
Provides a string representation of an array.
|
public static final String EMPTY
public static final int listMax
listMax
are entirely printed. A value of -1
leads to complete
printing of the list, whatever its size. This variable, when used in an agent server, may
be set by the debug variable Debug.var.fr.dyade.aaa.util.listMax
. Its default
value is 10
.
public static final int listBorder
listMax
are partially printed, with the listBorder
leading and
trailing elements. This variable, when used in an agent server, may be set by the debug
variable Debug.var.fr.dyade.aaa.util.listBorder
. Its default value is
3
.
public static final boolean isEjbQlIdentifier(String s)
s
- String to checktrue
if the given String is a reserved identifier in EJB-QL,
false
otherwise.public static boolean isEmpty(String string)
string
- String to checkpublic static final boolean isValidJavaIdentifier(String s)
s
- String to checktrue
if the given String is a valid Java identifier, false
otherwise.public static final boolean isJavaKeyword(String s)
s
- String to checktrue
if the given String is a reserved Java keyword, false
otherwise.public static final void toString(StringBuffer output, Object obj)
toString
function for the object class, or calls the
toString
function of the object.output
- a buffer to print the object intoobj
- the object to printpublic static final String toString(Object obj)
toString(StringBuffer)
.obj
- the object to printpublic static final void toByteArray(ByteArrayOutputStream output, String str)
This function works only for ASCII character encoding, and assumes this is the default encoding.
output
- a byte buffer to print the object intostr
- the string to printpublic static final void toString(StringBuffer output, String str)
This function works only for ASCII character encoding, and assumes this is the default encoding.
output
- a string buffer to print the object intostr
- the string to printpublic static final String toString(String str)
This function works only for ASCII character encoding, and assumes this is the default encoding.
str
- the string to printpublic static final void toString(StringBuffer output, Object obj, Class type)
listMax
and
listBorder
variables.output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentspublic static final void toStringArray(StringBuffer output, Object tab)
toString(StringBuffer, Object,
Class)
.output
- a buffer to print the object intotab
- the array to printpublic static final String toStringArray(Object tab)
toString(StringBuffer, Object,
Class)
.tab
- the array to printpublic static final void toString(StringBuffer output, boolean[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, byte[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, char[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, short[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, int[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, long[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, float[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, double[] tab)
listMax
and
listBorder
variables.output
- a buffer to print the object intotab
- the array to printpublic static final void toString(StringBuffer output, Vector vector)
listMax
and
listBorder
variables.output
- a buffer to print the object intovector
- the vector of Object
objects to printpublic static final String toString(Vector vector)
toString(StringBuffer,
...)
.vector
- the vector of Object
objects to printpublic static final void toString(StringBuffer output, Hashtable table)
listMax
and listBorder
variables.output
- a buffer to print the object intotable
- the table of Object
objects to printCopyright © GigaSpaces.