Java List Contain isContains(final Object value, final Object... list)

Here you can find the source of isContains(final Object value, final Object... list)

Description

is Contains

License

Apache License

Declaration

public static boolean isContains(final Object value, final Object... list) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

import static java.util.Arrays.stream;

public class Main {
    public static boolean isContains(final Object value, final Object... list) {
        return stream(list).anyMatch(it -> Objects.equals(value, it));
    }/* w  w  w .ja va 2 s  .  com*/
}

Related

  1. getListValue(Object container, int index)
  2. identityContains(Object o, List list)
  3. indexOfLineContaining(List lines, String s)
  4. isContain(List list, Integer i)
  5. isContainedInAll(String keyToSearch, List> list)
  6. isContains(List roles, String role, String module)
  7. isEitherContains(List one, List two)
  8. isListContainAll(List list, T... checkItems)
  9. isListContainsDuplicateElement(List oneList)