Java Collection Intersect intersection(Collection a, Collection b)

Here you can find the source of intersection(Collection a, Collection b)

Description

Intersection of two collections with duplicates

License

Apache License

Parameter

Parameter Description
a first collection
b second collection

Exception

Parameter Description
IllegalArgumentException if any of arguments is null

Return

new Collection with elements from a and b intersection, can have duplicates

Declaration

public static <T> Collection<T> intersection(Collection<T> a, Collection<T> b) throws IllegalArgumentException 

Method Source Code


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

import java.util.Collection;

public class Main {
    /**/*from w ww.  j  ava 2 s  .c om*/
     * Intersection of two collections with duplicates
     *
     * @param a first collection
     * @param b second collection
     * @return new Collection with elements from a and b intersection, can have duplicates
     * @throws IllegalArgumentException if any of arguments is null
     */
    public static <T> Collection<T> intersection(Collection<T> a, Collection<T> b) throws IllegalArgumentException {
        return null;
    }
}

Related

  1. intersection(Collection> collectionOfCollections)
  2. intersection(Collection> availableValuesByDescriptor)
  3. intersection(Collection... collections)
  4. intersection(Collection> sets)
  5. intersection(Collection a, Collection b)
  6. intersection(Collection a, Collection b)
  7. intersection(Collection values1, Collection values2)
  8. intersection(final Collection a, final Collection b)
  9. intersection(final Collection c1, final Collection c2)