Java Collection Contain containsSome(final Collection c1, final Collection c2)

Here you can find the source of containsSome(final Collection c1, final Collection c2)

Description

contains Some

License

Open Source License

Declaration

public static <E> boolean containsSome(final Collection<E> c1, final Collection<E> c2) 

Method Source Code


//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
}

Related

  1. containsSafe(Collection collection, V value)
  2. containsSame(Collection first, Collection second)
  3. containsSameItems(Collection col1, Collection col2)
  4. containsSameType(Object o, Collection collection)
  5. containsSome(Collection source, Collection target)
  6. containsSome(HashSet s1, Collection other)
  7. containsString(Collection coll, String str)
  8. containsString(String stringToCheck, Collection collection)
  9. containsStringIgnoreCase(Collection strings, String toCheck)