mk1990
2022-05-16 e6790d88fc5b1ac33d239c0d90ce6cdea666b821
1
2
3
4
5
6
7
8
9
10
11
12
package com.genersoft.iot.vmp.utils;
 
import java.util.Arrays;
 
public class CollectionUtil {
 
    public static <T> boolean contains(T[] array, final T element) {
        return array != null && Arrays.stream(array).anyMatch((x) -> {
            return ObjectUtils.nullSafeEquals(x, element);
        });
    }
}