Java Collection Intersect intersect(Collection t1, Collection t2)

Here you can find the source of intersect(Collection t1, Collection t2)

Description

intersect

License

Open Source License

Declaration

public static <T> boolean intersect(Collection<T> t1, Collection<T> t2) 

Method Source Code

//package com.java2s;

import java.util.Collection;

public class Main {
    public static <T> boolean intersect(Collection<T> t1, Collection<T> t2) {
        for (T t : t1) {
            if (t2.contains(t)) {
                return true;
            }/* w ww  .  j  a v a2 s .c om*/
        }
        return false;
    }
}

Related

  1. intersect(Collection collection, Collection otherCollection)
  2. intersect(Collection... collections)
  3. intersect(Collection a, Collection b)
  4. intersect(Collection collA, Collection collB, Collection target)
  5. intersect(Collection collection1, Collection collection2)
  6. intersectCollections(Collection collection1, Collection collection2)
  7. intersectingCollections(Collection collection1, Collection collection2)
  8. intersectInto(C into, Collection... from)
  9. intersection( Collection> coll)