Java List Union union(List set1, List set2)

Here you can find the source of union(List set1, List set2)

Description

union

License

Apache License

Declaration

public static <T> List<T> union(List<T> set1, List<T> set2) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static <T> List<T> union(List<T> set1, List<T> set2) {
        List<T> unionSet = new ArrayList<T>(set1);
        unionSet.addAll(set2);//from www .java 2 s . c o m

        return unionSet;
    }
}

Related

  1. union(final List... lists)
  2. Union(List A, List B)
  3. union(List ls, List ls2)
  4. union(List byteList)
  5. union(List list1, List list2, boolean duplicate)
  6. union(List... lists)
  7. unionAdd(List vect, E obj)
  8. unionCreditList(List list)
  9. unionList( Collection col1, Collection col2)