朱俊杰
2022-02-10 37a84e66917d6e22e03e31b0a115e2c16d23ed21
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);
        });
    }
}