|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.common.Strings
public class Strings
This class provides a set of static functions for building string representations of complex structures.
Field Summary | |
---|---|
static int |
listBorder
Controls the default formatting of lists of objects. |
static int |
listMax
Controls the default formatting of lists of objects. |
Constructor Summary | |
---|---|
Strings()
|
Method Summary | |
---|---|
static void |
toByteArray(java.io.ByteArrayOutputStream output,
java.lang.String str)
Provides a Java string literal representing the parameter string. |
static java.lang.String |
toString(java.util.Collection set)
Provides a string representation of an unordered Collection of objects. |
static java.lang.String |
toString(java.util.List list)
Provides a string representation of a list of objects. |
static java.lang.String |
toString(java.util.Map map)
Provides a string representation of a Map. |
static java.lang.String |
toString(java.lang.Object obj)
Provides a string representation of an object. |
static java.lang.String |
toString(java.lang.String str)
Provides a Java string literal representing the parameter string. |
static void |
toString(java.lang.StringBuffer output,
boolean[] tab)
Provides a string representation of an array of booleans. |
static void |
toString(java.lang.StringBuffer output,
boolean[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of booleans. |
static void |
toString(java.lang.StringBuffer output,
byte[] tab)
Provides a string representation of an array of bytes. |
static void |
toString(java.lang.StringBuffer output,
byte[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of bytes. |
static void |
toString(java.lang.StringBuffer output,
char[] tab)
Provides a string representation of an array of chars. |
static void |
toString(java.lang.StringBuffer output,
char[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of chars. |
static void |
toString(java.lang.StringBuffer output,
java.util.Collection set)
Provides a string representation of an unordered Collection of objects. |
static void |
toString(java.lang.StringBuffer output,
java.util.Collection set,
int listMax,
int listBorder)
Provides a string representation of an unordered Collection of objects. |
static void |
toString(java.lang.StringBuffer output,
double[] tab)
Provides a string representation of an array of doubles. |
static void |
toString(java.lang.StringBuffer output,
double[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of doubles. |
static void |
toString(java.lang.StringBuffer output,
float[] tab)
Provides a string representation of an array of floats. |
static void |
toString(java.lang.StringBuffer output,
float[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of floats. |
static void |
toString(java.lang.StringBuffer output,
int[] tab)
Provides a string representation of an array of ints. |
static void |
toString(java.lang.StringBuffer output,
int[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of ints. |
static void |
toString(java.lang.StringBuffer output,
java.util.List list)
Provides a string representation of a list of objects. |
static void |
toString(java.lang.StringBuffer output,
java.util.List list,
int listMax,
int listBorder)
Provides a string representation of a list of objects. |
static void |
toString(java.lang.StringBuffer output,
long[] tab)
Provides a string representation of an array of longs. |
static void |
toString(java.lang.StringBuffer output,
long[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of longs. |
static void |
toString(java.lang.StringBuffer output,
java.util.Map.Entry entry)
Provides a string representation of a Map entry. |
static void |
toString(java.lang.StringBuffer output,
java.util.Map map)
Provides a string representation of a Map. |
static void |
toString(java.lang.StringBuffer output,
java.lang.Object obj)
Provides a string representation of an object. |
static void |
toString(java.lang.StringBuffer output,
java.lang.Object[] tab)
Provides a string representation of an array of objects. |
static void |
toString(java.lang.StringBuffer output,
java.lang.Object[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of objects. |
static void |
toString(java.lang.StringBuffer output,
java.lang.Object obj,
java.lang.Class type)
Provides a string representation of an array. |
static void |
toString(java.lang.StringBuffer output,
java.lang.Object obj,
java.lang.Class type,
int listMax,
int listBorder)
Provides a string representation of an array. |
static void |
toString(java.lang.StringBuffer output,
short[] tab)
Provides a string representation of an array of shorts. |
static void |
toString(java.lang.StringBuffer output,
short[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of shorts. |
static void |
toString(java.lang.StringBuffer output,
java.lang.String str)
Provides a Java string literal representing the parameter string. |
static java.lang.String |
toStringArray(java.lang.Object tab)
Provides a string representation of an array. |
static void |
toStringArray(java.lang.StringBuffer output,
java.lang.Object tab)
Provides a string representation of an array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static 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 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
is 3
.
Constructor Detail |
---|
public Strings()
Method Detail |
---|
public static final void toString(java.lang.StringBuffer output, java.lang.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 java.lang.String toString(java.lang.Object obj)
toString(StringBuffer)
.
obj
- the object to print
public static final void toByteArray(java.io.ByteArrayOutputStream output, java.lang.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(java.lang.StringBuffer output, java.lang.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 java.lang.String toString(java.lang.String str)
This function works only for ASCII character encoding, and assumes this is the default encoding.
str
- the string to print
public static final void toString(java.lang.StringBuffer output, java.lang.Object obj, java.lang.Class type)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, java.lang.Object obj, java.lang.Class type, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements. A value
of -1
for listMax
leads to complete printing of the list,
whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toStringArray(java.lang.StringBuffer output, java.lang.Object tab)
toString(StringBuffer, Object, Class)
.
output
- a buffer to print the object intotab
- the array to printtype
- the type of the array componentspublic static final java.lang.String toStringArray(java.lang.Object tab)
toString(StringBuffer, Object, Class)
.
tab
- the array to print
toString(StringBuffer, Object, Class)
public static final void toString(java.lang.StringBuffer output, boolean[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, boolean[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, byte[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, byte[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, char[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, char[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, short[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, short[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, int[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, int[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, long[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, long[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, float[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, float[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, double[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, double[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, java.lang.Object[] tab)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, java.lang.Object[] tab, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoobj
- the array to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(java.lang.StringBuffer output, java.util.List list)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intolist
- the list of Object
objects to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, java.util.List list, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intolist
- the list of Object
objects to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final java.lang.String toString(java.util.List list)
toString(StringBuffer, ...)
.
list
- the list of Object
objects to print
public static final void toString(java.lang.StringBuffer output, java.util.Collection set)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
output
- a buffer to print the object intoset
- the collection to printtype
- the type of the array componentslistMax
,
listBorder
public static final void toString(java.lang.StringBuffer output, java.util.Collection set, int listMax, int listBorder)
Lists with a number of elements greater than listMax
are partially
printed, with the listBorder
leading and trailing elements.
A value of -1
for listMax
leads to complete printing of
the list, whatever its size.
output
- a buffer to print the object intoset
- the collection to printtype
- the type of the array componentslistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final java.lang.String toString(java.util.Collection set)
toString(StringBuffer, ...)
.
list
- the collection to print
public static final void toString(java.lang.StringBuffer output, java.util.Map map)
listMax
and listBorder
variables.
output
- a buffer to print the object intomap
- the map to printpublic static final java.lang.String toString(java.util.Map map)
toString(StringBuffer, ...)
.
map
- the map to print
public static final void toString(java.lang.StringBuffer output, java.util.Map.Entry entry)
output
- a buffer to print the object intoentry
- the map entry to print
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |