houzhongjian
2024-10-30 a28ca3f36d0ace05966a8c0fac1e4b5fe921f882
提交 | 用户 | 时间
ce910c 1 package com.netsdk.lib.enumeration;
H 2
3 /**
4  * @author 251823
5  * @description 防区类型
6  * @date 2023/04/18 10:57:31
7  */
8 public enum EM_CFG_DEFENCEAREATYPE {
9     /**
10      * 未知类型
11      */
12     EM_CFG_DefenceAreaType_Unknown(0, "未知类型"),
13     /**
14      * 即时防区
15      */
16     EM_CFG_DefenceAreaType_InTime(1, "即时防区"),
17     /**
18      * 延时防区
19      */
20     EM_CFG_DefenceAreaType_Delay(2, "延时防区"),
21     /**
22      * 24小时防区
23      */
24     EM_CFG_DefenceAreaType_FullDay(3, "24小时防区"),
25     /**
26      * 跟随防区
27      */
28     EM_CFG_DefenceAreaType_Follow(4, "跟随防区"),
29     /**
30      * 医疗紧急防区
31      */
32     EM_CFG_DefenceAreaType_Medical(5, "医疗紧急防区"),
33     /**
34      * 恐慌防区
35      */
36     EM_CFG_DefenceAreaType_Panic(6, "恐慌防区"),
37     /**
38      * 火警防区
39      */
40     EM_CFG_DefenceAreaType_Fire(7, "火警防区"),
41     /**
42      * 24小时有声防区
43      */
44     EM_CFG_DefenceAreaType_FullDaySound(8, "24小时有声防区"),
45     /**
46      * 24小时无声防区
47      */
48     EM_CFG_DefenceAreaType_FullDaySlient(9, "24小时无声防区"),
49     /**
50      * 出入防区1
51      */
52     EM_CFG_DefenceAreaType_Entrance1(10, "出入防区1"),
53     /**
54      * 出入防区2
55      */
56     EM_CFG_DefenceAreaType_Entrance2(11, "出入防区2"),
57     /**
58      * 内部防区
59      */
60     EM_CFG_DefenceAreaType_InSide(12, "内部防区"),
61     /**
62      * 外部防区
63      */
64     EM_CFG_DefenceAreaType_OutSide(13, "外部防区"),
65     /**
66      * 人员检测防区
67      */
68     EM_CFG_DefenceAreaType_PeopleDetect(14, "人员检测防区"),
69     /**
70      * 匪警防区
71      */
72     EM_CFG_DefenceAreaType_Robbery(15, "匪警防区");
73
74     private int value;
75
76     private String note;
77
78     public String getNote() {
79         return note;
80     }
81
82     public int getValue() {
83         return value;
84     }
85
86     EM_CFG_DEFENCEAREATYPE(int givenValue, String note) {
87         this.value = givenValue;
88         this.note = note;
89     }
90
91     public static String getNoteByValue(int givenValue) {
92         for (EM_CFG_DEFENCEAREATYPE enumType : EM_CFG_DEFENCEAREATYPE.values()) {
93             if (givenValue == enumType.getValue()) {
94                 return enumType.getNote();
95             }
96         }
97         return null;
98     }
99
100     public static int getValueByNote(String givenNote) {
101         for (EM_CFG_DEFENCEAREATYPE enumType : EM_CFG_DEFENCEAREATYPE.values()) {
102             if (givenNote.equals(enumType.getNote())) {
103                 return enumType.getValue();
104             }
105         }
106         return -1;
107     }
108 }