Here you can find the source of containsSome(final Collection
public static <E> boolean containsSome(final Collection<E> c1, final Collection<E> c2)
//package com.java2s; import java.util.*; public class Main { public static <E> boolean containsSome(final Collection<E> c1, final Collection<E> c2) { for (E e : c2) if (c1.contains(e)) return true; return false; }//from w ww . j a v a 2 s . c o m }