/** * Returns the concatenated string representation of the elements in the given iterator. No delimiter is used. * The given iterator is left exhausted. * * @param iterator * the iterator. May not be <code>null</code>. * @return the string representation of the iterator's elements. Never <code>null</code>. * @see #join(Iterator, CharSequence, org.eclipse.xtext.xbase.lib.Functions.Function1) */ public static String join(Iterator<?> iterator) { return join(iterator, ""); }
/** * Returns the concatenated string representation of the elements in the given iterator. No delimiter is used. * The given iterator is left exhausted. * * @param iterator * the iterator. May not be <code>null</code>. * @return the string representation of the iterator's elements. Never <code>null</code>. * @see #join(Iterator, CharSequence, org.eclipse.xtext.xbase.lib.Functions.Function1) */ public static String join(Iterator<?> iterator) { return join(iterator, ""); }
/** * Returns the concatenated string representation of the elements in the given iterable. No delimiter is used. * * @param iterable * the iterable. May not be <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. * @see #join(Iterable, CharSequence, org.eclipse.xtext.xbase.lib.Functions.Function1) */ public static String join(Iterable<?> iterable) { return IteratorExtensions.join(iterable.iterator()); }
/** * Returns the concatenated string representation of the elements in the given iterable. No delimiter is used. * * @param iterable * the iterable. May not be <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. * @see #join(Iterable, CharSequence, org.eclipse.xtext.xbase.lib.Functions.Function1) */ public static String join(Iterable<?> iterable) { return IteratorExtensions.join(iterable.iterator()); }
/** * Returns the concatenated string representation of the elements in the given iterable. The {@code separator} is * used to between each pair of entries in the input. The string <code>null</code> is used for <code>null</code> * entries in the input. * * @param iterable * the iterable. May not be <code>null</code>. * @param separator * the separator. May not be <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. * @see #join(Iterable, CharSequence, org.eclipse.xtext.xbase.lib.Functions.Function1) */ public static String join(Iterable<?> iterable, CharSequence separator) { return IteratorExtensions.join(iterable.iterator(), separator); }
/** * Returns the concatenated string representation of the elements in the given iterable. The {@code separator} is * used to between each pair of entries in the input. The string <code>null</code> is used for <code>null</code> * entries in the input. * * @param iterable * the iterable. May not be <code>null</code>. * @param separator * the separator. May not be <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. * @see #join(Iterable, CharSequence, org.eclipse.xtext.xbase.lib.Functions.Function1) */ public static String join(Iterable<?> iterable, CharSequence separator) { return IteratorExtensions.join(iterable.iterator(), separator); }
/** * Returns the concatenated string representation of the elements in the given iterable. The {@code function} is * used to compute the string for each element. The {@code separator} is used to between each pair of entries in the * input. The string <code>null</code> is used if the function yields <code>null</code> as the string representation * for an entry. * * @param iterable * the iterable. May not be <code>null</code>. * @param separator * the separator. May not be <code>null</code>. * @param function * the function that is used to compute the string representation of a single element. May not be * <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. */ public static <T> String join(Iterable<T> iterable, CharSequence separator, Functions.Function1<? super T, ? extends CharSequence> function) { return IteratorExtensions.join(iterable.iterator(), separator, function); }
/** * Returns the concatenated string representation of the elements in the given iterable. The {@code function} is * used to compute the string for each element. The {@code separator} is used to between each pair of entries in the * input. The string <code>null</code> is used if the function yields <code>null</code> as the string representation * for an entry. * * @param iterable * the iterable. May not be <code>null</code>. * @param separator * the separator. May not be <code>null</code>. * @param function * the function that is used to compute the string representation of a single element. May not be * <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. */ public static <T> String join(Iterable<T> iterable, CharSequence separator, Functions.Function1<? super T, ? extends CharSequence> function) { return IteratorExtensions.join(iterable.iterator(), separator, function); }
/** * Returns the concatenated string representation of the elements in the given iterable. The {@code function} is * used to compute the string for each element. The {@code separator} is used to between each pair of entries in the * input. The string <code>null</code> is used if the function yields <code>null</code> as the string representation * for an entry. * * @param iterable * the iterable. May not be <code>null</code>. * @param before * prepends the resulting string if the iterable contains at least one element. May be <code>null</code> which is equivalent to passing an empty string. * @param separator * the separator. May be <code>null</code> which is equivalent to passing an empty string. * @param after * appended to the resulting string if the iterable contain at least one element. May be <code>null</code> which is equivalent to passing an empty string. * @param function * the function that is used to compute the string representation of a single element. May not be * <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. */ public static <T> String join(Iterable<T> iterable, CharSequence before, CharSequence separator, CharSequence after, Functions.Function1<? super T, ? extends CharSequence> function) { return IteratorExtensions.join(iterable.iterator(), before, separator, after, function); }
/** * Returns the concatenated string representation of the elements in the given iterable. The {@code function} is * used to compute the string for each element. The {@code separator} is used to between each pair of entries in the * input. The string <code>null</code> is used if the function yields <code>null</code> as the string representation * for an entry. * * @param iterable * the iterable. May not be <code>null</code>. * @param before * prepends the resulting string if the iterable contains at least one element. May be <code>null</code> which is equivalent to passing an empty string. * @param separator * the separator. May be <code>null</code> which is equivalent to passing an empty string. * @param after * appended to the resulting string if the iterable contain at least one element. May be <code>null</code> which is equivalent to passing an empty string. * @param function * the function that is used to compute the string representation of a single element. May not be * <code>null</code>. * @return the string representation of the iterable's elements. Never <code>null</code>. */ public static <T> String join(Iterable<T> iterable, CharSequence before, CharSequence separator, CharSequence after, Functions.Function1<? super T, ? extends CharSequence> function) { return IteratorExtensions.join(iterable.iterator(), before, separator, after, function); }