Here you can find the source of containsAtLeastOneElement(List
public static boolean containsAtLeastOneElement(List<String> l1, List<String> l2)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static boolean containsAtLeastOneElement(List<String> l1, List<String> l2) { if (l1 == null || l2 == null) return false; for (String s : l1) { if (l2.contains(s)) return true; }/* w w w .j av a2 s .c o m*/ return false; } }