Java List Intersect isListIntersect(List list1, List list2)

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

Description

is List Intersect

License

Apache License

Declaration

public static boolean isListIntersect(List list1, List list2) 

Method Source Code

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

import java.util.List;

public class Main {

    public static boolean isListIntersect(List list1, List list2) {
        for (int i = 0; i < list1.size(); i++)
            if (list2.contains(list1.get(i)))
                return true;
        return false;
    }/*  w w w . j  av  a2  s . c  o  m*/
}

Related

  1. intersection(List set1, List set2)
  2. intersection_type(List list1, List list2)
  3. intersectionInplace(List> sets)
  4. intersectList(List list1, List list2)
  5. intersectSortedAscending(List l1, List l2)
  6. removeIntersection(List intervals, List intervalsToRemove)