/** * Add all elements in the iterable to the collection. * * @param target * @param iterable * @return true if the target was modified, false otherwise */ public static <T> boolean addAll(Collection<T> target, Iterable<? extends T> iterable) { if (iterable instanceof Collection) { return target.addAll((Collection<? extends T>) iterable); } return Iterators.addAll(target, iterable.iterator()); }
/** * Add all elements in the iterable to the collection. * * @param target * @param iterable * @return true if the target was modified, false otherwise */ public static <T> boolean addAll(Collection<T> target, Iterable<? extends T> iterable) { if (iterable instanceof Collection) { return target.addAll((Collection<? extends T>) iterable); } return Iterators.addAll(target, iterable.iterator()); }
/** * Add all elements in the iterable to the collection. * * @param target * @param iterable * @return true if the target was modified, false otherwise */ public static <T> boolean addAll(Collection<T> target, Iterable<? extends T> iterable) { if (iterable instanceof Collection) { return target.addAll((Collection<? extends T>) iterable); } return Iterators.addAll(target, iterable.iterator()); }
/** * Add all elements in the iterable to the collection. * * @param target * @param iterable * @return true if the target was modified, false otherwise */ public static <T> boolean addAll(Collection<T> target, Iterable<? extends T> iterable) { if (iterable instanceof Collection) { return target.addAll((Collection<? extends T>) iterable); } return Iterators.addAll(target, iterable.iterator()); }
/** * Add all elements in the iterable to the collection. * * @param target * @param iterable * @return true if the target was modified, false otherwise */ public static <T> boolean addAll(Collection<T> target, Iterable<? extends T> iterable) { if (iterable instanceof Collection) { return target.addAll((Collection<? extends T>) iterable); } return Iterators.addAll(target, iterable.iterator()); }
/** * Add all elements in the iterable to the collection. * * @param target * @param iterable * @return true if the target was modified, false otherwise */ public static <T> boolean addAll(Collection<T> target, Iterable<? extends T> iterable) { if (iterable instanceof Collection) { return target.addAll((Collection<? extends T>) iterable); } return Iterators.addAll(target, iterable.iterator()); }