Java Collection Add addAll(Collection target, Collection source)

Here you can find the source of addAll(Collection target, Collection source)

Description

add All

License

Open Source License

Declaration

public static <T extends Object> void addAll(Collection<T> target, Collection<T> source) 

Method Source Code

//package com.java2s;
/*/*from ww  w .ja va  2s  .  c  om*/
 * Copyright 2015-2020 MSUN.comm All right reserved. This software is the confidential and proprietary information of
 * MSUN.comm ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you entered into with MSUN.comm.
 */

import java.util.Collection;

public class Main {
    public static <T extends Object> void addAll(Collection<T> target, Collection<T> source) {
        if (target != null && source != null && source.size() > 0) {
            target.addAll(source);
        }
    }
}

Related

  1. addAll(Collection dest, Collection orig)
  2. addAll(Collection dest, T... elements)
  3. addAll(Collection intoCollection, Collection fromCollection)
  4. addAll(Collection left, Collection right)
  5. addAll(Collection t1, Iterable t2)
  6. addAll(Collection target, Iterable source)
  7. addAll(Collection target, S[] source)
  8. addAll(final Collection coll, final Object[] array)
  9. addAll(final Collection newItems, final Collection existingItems)