Java List Contain isListContainAll(List list, T... checkItems)

Here you can find the source of isListContainAll(List list, T... checkItems)

Description

is List Contain All

License

Open Source License

Declaration

@SafeVarargs
public static <T> boolean isListContainAll(List<T> list, T... checkItems) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {

    @SafeVarargs
    public static <T> boolean isListContainAll(List<T> list, T... checkItems) {
        boolean result = true;

        if (list.size() > 0 && checkItems.length > 0) {
            for (T t : checkItems) {
                if (!list.contains(t)) {
                    result = false;//from   w w w  .  j  a  v  a2  s .com
                    break;
                }
            }
        } else {
            result = false;
        }
        return result;
    }
}

Related

  1. isContain(List list, Integer i)
  2. isContainedInAll(String keyToSearch, List> list)
  3. isContains(final Object value, final Object... list)
  4. isContains(List roles, String role, String module)
  5. isEitherContains(List one, List two)
  6. isListContainsDuplicateElement(List oneList)
  7. pathContains(List path, String source, String label, String target)
  8. replaceWithList(List containingList, String key, List list)
  9. strContainsbyList(String str, List filterList)