myjf007
2024-11-04 627b61d17da1dbf02c0363c659b728627dd42890
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.nova.sankuai.infra.utils;
 
import java.util.Objects;
 
public class PubFunUtil {
    private static PubFunUtil pubFun = null;
    public static PubFunUtil getInstance() {
        if (null == pubFun) {
            pubFun = new PubFunUtil();
        }
        return pubFun;
    }
 
    public PubFunUtil(){
 
    }
 
    /**
     * Describe:判断字符串是否为json格式
     *
     * @param str : String 字符串
     * @return true是
     * Author: 纪新雷
     * CreateTime: 2022-08-18
     */
    public boolean isJSON2(String str) {
        boolean result = false;
        try {
            Object obj = com.alibaba.fastjson.JSON.parse(str);
            result = true;
        } catch (Exception e) {
            result = false;
        }
        return result;
    }
    /**
     * Describe:判断List是否为空
     *
     * @param listValue : java.util.List 值
     * @return true 为空
     * Author: 纪新雷
     * CreateTime: 2024-03-28
     */
    public boolean listIsNull(java.util.List listValue) {
 
        //return ((null == listValue) || (CollectionUtils.isEmpty(listValue)) || (listValue.isEmpty())) ;
        return ((null == listValue) || Objects.isNull(listValue) || (listValue.isEmpty())) ;
    }
    /**
     * Describe:判断Integer是否为空
     *
     * @param ai_value : Integer 值
     * @return true 为空
     * Author: 纪新雷
     * CreateTime: 2024-03-15
     */
    public boolean integerIsNull(Integer ai_value) {
 
        return ((null == ai_value) || (Objects.isNull(ai_value))) ;
    }
}