public class Strings extends Object
Modifier and Type | Field and Description |
---|---|
static int |
listBorder
Controls the default formatting of lists of objects.
|
static int |
listMax
Controls the default formatting of lists of objects.
|
Constructor and Description |
---|
Strings() |
Modifier and Type | Method and Description |
---|---|
static void |
toByteArray(ByteArrayOutputStream output,
String str)
Provides a Java string literal representing the parameter string.
|
static String |
toString(Collection<?> set)
Provides a string representation of an unordered Collection of objects.
|
static String |
toString(List<?> list)
Provides a string representation of a list of objects.
|
static String |
toString(Map<?,?> map)
Provides a string representation of a Map.
|
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,
boolean[] tab,
int listMax,
int listBorder)
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,
byte[] tab,
int listMax,
int listBorder)
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,
char[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of chars.
|
static void |
toString(StringBuffer output,
Collection<?> set)
Provides a string representation of an unordered Collection of objects.
|
static void |
toString(StringBuffer output,
Collection<?> set,
int listMax,
int listBorder)
Provides a string representation of an unordered Collection of objects.
|
static void |
toString(StringBuffer output,
double[] tab)
Provides a string representation of an array of doubles.
|
static void |
toString(StringBuffer output,
double[] tab,
int listMax,
int listBorder)
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,
float[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of floats.
|
static void |
toString(StringBuffer output,
int[] tab)
Provides a string representation of an array of ints.
|
static void |
toString(StringBuffer output,
int[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of ints.
|
static void |
toString(StringBuffer output,
List<?> list)
Provides a string representation of a list of objects.
|
static void |
toString(StringBuffer output,
List<?> list,
int listMax,
int listBorder)
Provides a string representation of a list of objects.
|
static void |
toString(StringBuffer output,
long[] tab)
Provides a string representation of an array of longs.
|
static void |
toString(StringBuffer output,
long[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of longs.
|
static void |
toString(StringBuffer output,
Map.Entry<?,?> entry)
Provides a string representation of a Map entry.
|
static void |
toString(StringBuffer output,
Map<?,?> map)
Provides a string representation of a Map.
|
static void |
toString(StringBuffer output,
Object obj)
Provides a string representation of an object.
|
static void |
toString(StringBuffer output,
Object[] tab)
Provides a string representation of an array of objects.
|
static void |
toString(StringBuffer output,
Object[] tab,
int listMax,
int listBorder)
Provides a string representation of an array of objects.
|
static void |
toString(StringBuffer output,
Object obj,
Class<?> type)
Provides a string representation of an array.
|
static void |
toString(StringBuffer output,
Object obj,
Class<?> type,
int listMax,
int listBorder)
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,
short[] tab,
int listMax,
int listBorder)
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 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 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
.
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)
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(StringBuffer output, Object obj, 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(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 printtoString(StringBuffer, Object, Class)
public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(StringBuffer output, 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 intotab
- the array to printlistMax
,
listBorder
public static final void toString(StringBuffer output, 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 intotab
- the array to printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final void toString(StringBuffer output, 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 printlistMax
,
listBorder
public static final void toString(StringBuffer output, 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 printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final String toString(List<?> list)
toString(StringBuffer, ...)
.list
- the list of Object
objects to printpublic static final void toString(StringBuffer output, 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 printlistMax
,
listBorder
public static final void toString(StringBuffer output, 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 printlistMax
- Controls the formatting of lists of objects.listBorder
- Controls the formatting of lists of objects.public static final String toString(Collection<?> set)
toString(StringBuffer, ...)
.set
- the collection to printpublic static final void toString(StringBuffer output, Map<?,?> map)
listMax
and listBorder
variables.output
- a buffer to print the object intomap
- the map to printpublic static final String toString(Map<?,?> map)
toString(StringBuffer, ...)
.map
- the map to printpublic static final void toString(StringBuffer output, Map.Entry<?,?> entry)
output
- a buffer to print the object intoentry
- the map entry to printCopyright © 2021 ScalAgent D.T.. All rights reserved.