/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) { return "null"; } // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) return "null"; // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) { return "null"; } // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) { return "null"; } // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) { return "null"; } // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) { return "null"; } // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) { return "null"; } // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }
newOrigArrays[origArrays.length] = newArray; deepToStringImpl(newArray, newOrigArrays, sb);
/** * Creates a <i>"deep"</i> {@code String} representation of the * {@code Object[]} passed, such that if the array contains other arrays, * the {@code String} representation of those arrays is generated as well. * <p> * If any of the elements are primitive arrays, the generation is delegated * to the other {@code toString} methods in this class. If any element * contains a reference to the original array, then it will be represented * as {@code "[...]"}. If an element is an {@code Object[]}, then its * representation is generated by a recursive call to this method. All other * elements are converted via the {@link String#valueOf(Object)} method. * * @param array * the {@code Object} array to convert. * @return the {@code String} representation of {@code array}. * @since 1.5 */ public static String deepToString(Object[] array) { // Special case null to prevent NPE if (array == null) { return "null"; } // delegate this to the recursive method StringBuilder buf = new StringBuilder(array.length * 9); deepToStringImpl(array, new Object[] { array }, buf); return buf.toString(); }