List of utility methods to do Array Deep to String
String | deepToString(double[][] array) deep To String StringBuilder sb = new StringBuilder(); sb.append("["); for (double[] arr : array) { sb.append("["); for (double a : arr) { sb.append(String.format("%10.3g, ", a)); sb.append("], "); ... |
String | deepToString(int[] values) Print the contents of an int[]. StringBuilder b = new StringBuilder(); b.append("["); for (int i = 0; i < values.length; i++) { b.append(values[i]); b.append(", "); b.delete(b.length() - 2, b.length() - 1); b.append("]"); ... |
String | deepToString(Object[] array) Simple method to walk an array and call toString() on each of the entries.
StringBuffer buffer = new StringBuffer(); for (int i = 0; i < array.length; i++) { buffer.append(array[i].toString()); if (i < array.length - 1) { buffer.append(','); return buffer.toString(); ... |