Here you can find the source of union(Collection
Parameter | Description |
---|---|
a | first collection |
b | second collection |
Parameter | Description |
---|---|
IllegalArgumentException | if any of arguments is null |
public static <T> Collection<T> union(Collection<T> a, Collection<T> b) throws IllegalArgumentException
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { /**/*from w w w.j a va2s . co m*/ * Union of two collections with duplicates * * @param a first collection * @param b second collection * @return new Collection with elements from a and b, can have duplicates * @throws IllegalArgumentException if any of arguments is null */ public static <T> Collection<T> union(Collection<T> a, Collection<T> b) throws IllegalArgumentException { return null; } }