import java.util.Collection; import java.util.Iterator; /** */ public class Test { /** * * @param * @param * @param collection * @param iterable * @return a value */ public static > T addAll(final T collection, final Iterable iterable) { assert collection != null; assert iterable != null; return null; } /** * Adds all the elements from the iterable to the collection. The * {@link Iterable#iterator} method will be called for the iterable and * the resulting iterator will be exhausted. * * @param the type of elements to add * @param the result to put into * * @param collection The collection to populate. * @param iterator The {@link Iterator} to populate from. * * @return The populated collection. */ public static > T addAll(final T collection, final Iterator iterator) { assert collection != null; assert iterator != null; return null; } /** Test {@link #addAll(Object, Iterable)} and {@link #addAll(Object, Iterator)}. */ public void test() { } /** Test {@link #addAll(T, Iterable)} and {@link #addAll(T, Iterator)}. */ public void test2() { } }