/** * Converts an Iteration to a string by concatenating all of the string representations of objects in the * Iteration, divided by a separator. * * @param iter * An Iteration over arbitrary objects that are expected to implement {@link Object#toString()}. * @param separator * The separator to insert between the object strings. * @return A String representation of the objects provided by the supplied Iteration. */ public static <X extends Exception> String toString(Iteration<?, X> iter, String separator) throws X { StringBuilder sb = new StringBuilder(); toString(iter, separator, sb); return sb.toString(); }
/** * Converts an Iteration to a string by concatenating all of the string representations of objects in the * Iteration, divided by a separator. * * @param iter * An Iteration over arbitrary objects that are expected to implement {@link Object#toString()}. * @param separator * The separator to insert between the object strings. * @return A String representation of the objects provided by the supplied Iteration. */ public static <X extends Exception> String toString(Iteration<?, X> iter, String separator) throws X { StringBuilder sb = new StringBuilder(); toString(iter, separator, sb); return sb.toString(); }
/** * Converts an Iteration to a string by concatenating all of the string representations of objects in the * Iteration, divided by a separator. * * @param iter * An Iteration over arbitrary objects that are expected to implement {@link Object#toString()}. * @param separator * The separator to insert between the object strings. * @return A String representation of the objects provided by the supplied Iteration. */ public static <X extends Exception> String toString(Iteration<?, X> iter, String separator) throws X { StringBuilder sb = new StringBuilder(); toString(iter, separator, sb); return sb.toString(); }