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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package com.iailab.netsdk.lib.enumeration;
 
/**
 * @author 251823
 * @description 防区类型
 * @date 2023/04/18 10:57:31
 */
public enum EM_CFG_DEFENCEAREATYPE {
    /**
     * 未知类型
     */
    EM_CFG_DefenceAreaType_Unknown(0, "未知类型"),
    /**
     * 即时防区
     */
    EM_CFG_DefenceAreaType_InTime(1, "即时防区"),
    /**
     * 延时防区
     */
    EM_CFG_DefenceAreaType_Delay(2, "延时防区"),
    /**
     * 24小时防区
     */
    EM_CFG_DefenceAreaType_FullDay(3, "24小时防区"),
    /**
     * 跟随防区
     */
    EM_CFG_DefenceAreaType_Follow(4, "跟随防区"),
    /**
     * 医疗紧急防区
     */
    EM_CFG_DefenceAreaType_Medical(5, "医疗紧急防区"),
    /**
     * 恐慌防区
     */
    EM_CFG_DefenceAreaType_Panic(6, "恐慌防区"),
    /**
     * 火警防区
     */
    EM_CFG_DefenceAreaType_Fire(7, "火警防区"),
    /**
     * 24小时有声防区
     */
    EM_CFG_DefenceAreaType_FullDaySound(8, "24小时有声防区"),
    /**
     * 24小时无声防区
     */
    EM_CFG_DefenceAreaType_FullDaySlient(9, "24小时无声防区"),
    /**
     * 出入防区1
     */
    EM_CFG_DefenceAreaType_Entrance1(10, "出入防区1"),
    /**
     * 出入防区2
     */
    EM_CFG_DefenceAreaType_Entrance2(11, "出入防区2"),
    /**
     * 内部防区
     */
    EM_CFG_DefenceAreaType_InSide(12, "内部防区"),
    /**
     * 外部防区
     */
    EM_CFG_DefenceAreaType_OutSide(13, "外部防区"),
    /**
     * 人员检测防区
     */
    EM_CFG_DefenceAreaType_PeopleDetect(14, "人员检测防区"),
    /**
     * 匪警防区
     */
    EM_CFG_DefenceAreaType_Robbery(15, "匪警防区");
 
    private int value;
 
    private String note;
 
    public String getNote() {
        return note;
    }
 
    public int getValue() {
        return value;
    }
 
    EM_CFG_DEFENCEAREATYPE(int givenValue, String note) {
        this.value = givenValue;
        this.note = note;
    }
 
    public static String getNoteByValue(int givenValue) {
        for (EM_CFG_DEFENCEAREATYPE enumType : EM_CFG_DEFENCEAREATYPE.values()) {
            if (givenValue == enumType.getValue()) {
                return enumType.getNote();
            }
        }
        return null;
    }
 
    public static int getValueByNote(String givenNote) {
        for (EM_CFG_DEFENCEAREATYPE enumType : EM_CFG_DEFENCEAREATYPE.values()) {
            if (givenNote.equals(enumType.getNote())) {
                return enumType.getValue();
            }
        }
        return -1;
    }
}