List of utility methods to do Array to String
String | toString(int[] v, char delim) Return a string representation of an integer array. if (v == null) return ""; StringBuilder strbuf = new StringBuilder(); for (int i = 0; i < v.length; i++) { if (i > 0) strbuf.append(delim); strbuf.append(v[i]); return strbuf.toString(); |
String[] | toString(long[] dom) to String String[] result = new String[dom.length]; for (int i = 0; i < dom.length; i++) result[i] = String.valueOf(dom[i]); return result; |
String | toString(Map to String String str = null; if (arg != null) { StringBuffer sb = new StringBuffer(); sb.append("{"); Set<Entry<String, String[]>> entries = arg.entrySet(); for (Entry<String, String[]> entry : entries) { String key = entry.getKey(); String val = Arrays.toString(entry.getValue()); ... |
String | toString(Object array) to String if (array == null) { return null; Class<?> type = array.getClass(); if (type.isArray()) { if (type.getComponentType().isPrimitive()) { if (type == byte[].class) { byte[] valueArray = (byte[]) array; ... |
String | toString(Object array) Constructs a string representation for the given array that describes its contents (as opposed to the default Object#toString() version that arrays inherit). Class<?> arrayType = array.getClass(); if (!arrayType.isArray()) { throw new IllegalArgumentException("specified object is not an array"); Class<?> componentType = arrayType.getComponentType(); if (componentType.isPrimitive()) { if (componentType == boolean.class) { return Arrays.toString((boolean[]) array); ... |
String | toString(Object array) Outputs an array as a String, treating return toString(array, "{}"); |
String | toString(Object array[]) to String return toString(array, ","); |
String | toString(Object[] a) Returns a string representation of the contents of the specified array. if (a == null) return "null"; if (a.length == 0) return "[]"; StringBuffer buf = new StringBuffer(); buf.append('[').append(a[0]); for (int i = 1; i < a.length; i++) { buf.append(", ").append(a[i]); ... |
String | toString(Object[] array) Returns the specified array as a comma-delimited (',') string. return toDelimitedString(array, ","); |
String | toString(Object[] array) Convert the given array to String. return Arrays.toString(array);
|