Java List Union union(final List list1, final List list2)

Here you can find the source of union(final List list1, final List list2)

Description

union

License

Apache License

Declaration

public static <E> List<E> union(final List<? extends E> list1, final List<? extends E> list2) 

Method Source Code


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

import java.util.ArrayList;

import java.util.List;

public class Main {

    public static <E> List<E> union(final List<? extends E> list1, final List<? extends E> list2) {
        final List<E> result = new ArrayList<E>(list1.size() + list2.size());
        result.addAll(list1);//from w ww  .  jav a 2s  .c  om
        result.addAll(list2);
        return result;
    }
}

Related

  1. shallowUnionCol(Collection> values)
  2. union(final char[]... list)
  3. union(final List list1, final List list2)
  4. union(final List list1, final List list2)
  5. union(final List list1, final List list2)
  6. union(final List... lists)
  7. Union(List A, List B)
  8. union(List ls, List ls2)