public class ArrayUtils
extends java.lang.Object
| Constructor and Description |
|---|
ArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
toString(java.lang.Object[] array,
java.lang.String delimiter)
Call toString() on each element of the array and concatenate the resulting
strings together, separated by the given delimiter.
|
static java.lang.String |
toString(java.lang.Object[] array,
java.lang.String delimiter,
java.lang.String prefix,
java.lang.String suffix)
Call toString() on each element of the array and concatenate the resulting
strings together, separated by the given delimiter and by adding and appending
the given prefix and suffix.
|
public static java.lang.String toString(java.lang.Object[] array,
java.lang.String delimiter)
toString(null, *) => "null"
toString(new Object[0], *) => "[]"
toString(new Object[] {"a"}, *) => "[a]"
toString(new Object[] {"a", "b"}, ";") => "[a;b]"
array - Array of elements to print.delimiter - The delimiter to use when concatenating the strings,
", " leads to the same behavior as Arrays.toString()public static java.lang.String toString(java.lang.Object[] array,
java.lang.String delimiter,
java.lang.String prefix,
java.lang.String suffix)
toString(null, *) => "null"
toString(new Object[0], *, "(", ")") => "()"
toString(new Object[] {"a"}, *, "(", ")") => "(a)"
toString(new Object[] {"a", "b"}, ",", "(", ")") => "(a,b)"
array - Array of elements to print.delimiter - The delimiter to use when concatenating the strings,
", " leads to the same behavior as Arrays.toString()prefix - the starting string which is concatenated to the beginningsuffix - the ending string which is concatenated at the end