List of utility methods to do Collection Add
void | add(Collection c, Object o) add c.add(o); |
void | add(Collection add collection.remove(object); collection.add(object); |
boolean | add(Collection Add a value to a collection provided both the collection and the value are not null. return object != null && collection != null && collection.add(object);
|
Collection extends T> | add_all(Collection extends T> target, Collection extends T> source) adall ((Collection<T>) target).addAll(source);
return target;
|
void | add_news(Collection adnews for (Iterator<? extends T> it = to_add.iterator(); it.hasNext();) { T element = it.next(); if (!target.contains(element)) target.add(element); |
C | addAll(C collection, Iterable extends E> add) Adds all elements in the add Iterable to the collection Collection. if (add instanceof Collection) { collection.addAll((Collection<E>) add); } else { for (E a : add) { collection.add(a); return collection; ... |
C | addAll(C collection, T... elements) add All collection.addAll(Arrays.asList(elements));
return collection;
|
void | addAll(Collection collection, Iterator iterator) Adds all elements in the iteration to the given collection. while (iterator.hasNext()) {
collection.add(iterator.next());
|
void | addAll(Collection collection, Object[] array) Add all elements from the supplied array to the specified collection. for (Object obj : array) {
collection.add(obj);
|
void | addAll(Collection collection, Object[] array) add All for (int i = 0, max = array.length; i < max; i++) { collection.add(array[i]); |