Java Collection Add addAll(T coll, Collection other)

Here you can find the source of addAll(T coll, Collection other)

Description

add All

License

Open Source License

Declaration

public static <E, T extends List<? super E>> T addAll(T coll, Collection<E> other) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2007 DSource.org and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:// w ww . ja v a 2  s . c  o  m
 *     Bruno Medeiros - initial implementation
 *******************************************************************************/

import java.util.Collection;

import java.util.List;

public class Main {
    public static <E, T extends List<? super E>> T addAll(T coll, Collection<E> other) {
        coll.addAll(other);
        return coll;
    }
}

Related

  1. addAll(final T[] source, final Collection destination)
  2. addAll(final TCollection target, final Iterable source)
  3. addAll(Iterable iterable, Collection collection)
  4. addAll(Iterable iterable, Collection collection)
  5. addAll(S collection, T... values)
  6. addAll(T[] lhs, Collection rhs)
  7. addAllFirst(Collection col, Deque deque)
  8. addAllIfNotNull(final Collection collection, final Collection c)
  9. addAllIfNotNull(final Collection collection, final Collection values)