Java List Union unionList( Collection col1, Collection col2)

Here you can find the source of unionList( Collection col1, Collection col2)

Description

union List

License

Open Source License

Declaration

public static <T> List<? extends T> unionList(
             Collection<? extends T> col1, Collection<? extends T> col2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.Collection;

import java.util.List;

public class Main {
    public static <T> List<? extends T> unionList(
            Collection<? extends T> col1, Collection<? extends T> col2) {
        List<T> result = new ArrayList<>(col1.size() + col2.size());
        result.addAll(col1);/*from w  ww .  j ava 2 s  . c om*/
        result.addAll(col2);
        return result;
    }
}

Related

  1. union(List list1, List list2, boolean duplicate)
  2. union(List set1, List set2)
  3. union(List... lists)
  4. unionAdd(List vect, E obj)
  5. unionCreditList(List list)
  6. unionList(List la, List lb)
  7. unionList(List list1, List list2)
  8. unionOfListOfLists( final Collection> collectionOfCollection)
  9. unionSeparator(List elements, String separator)