Java List Contain containsAtLeastOneElement(List l1, List l2)

Here you can find the source of containsAtLeastOneElement(List l1, List l2)

Description

contains At Least One Element

License

Open Source License

Declaration

public static boolean containsAtLeastOneElement(List<String> l1, List<String> l2) 

Method Source Code

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

Related

  1. containsAny(List value, Object[] values)
  2. containsAny(Set theList, Set toSearch)
  3. containsAnyOf(Exception e, List nonRetryableKeywords)
  4. containsArgument(List argList, Option option)
  5. containsAtLeastAValue(List values)
  6. containsBasedOnEntryIdentity(final List list, final Object object)
  7. containsCaseInsensitive(String s, List l)
  8. containsColumnByAlias(List columns, String alias)
  9. containsDuplicates(List list, Comparator comparator)