dongyukun
2024-11-05 e8ad669f7c97d45cd23630dc101180a130d6c17e
提交 | 用户 | 时间
ce910c 1 package com.netsdk.lib.enumeration;
H 2
3
4 /** 
5 * @author 291189
6 * @description  X光机物品检测配置等级 
7 * @date 2022/12/01 16:22:06
8 */
9 public enum EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL {
10 /**
11 未知
12 */
13 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_UNKNWON(-1,"未知"),
14 /**
15
16 */
17 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_HIGH(0,"高"),
18 /**
19
20 */
21 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_MID(1,"中"),
22 /**
23 普通
24 */
25 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_NORMAL(2,"普通"),
26 /**
27 自定义1
28 */
29 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_CUSTOM1(3,"自定义1"),
30 /**
31 自定义2
32 */
33 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_CUSTOM2(4,"自定义2"),
34 /**
35 自定义3
36 */
37 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_CUSTOM3(5,"自定义3"),
38 /**
39 自定义4
40 */
41 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_CUSTOM4(6,"自定义4"),
42 /**
43 自定义5
44 */
45 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_CUSTOM5(7,"自定义5");
46
47 private int value;
48
49 private String note;
50
51 public String getNote() {
52         return note;
53     }
54
55 public int getValue() {
56         return value;
57     }
58
59 EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL(int givenValue, String note) {
60         this.value = givenValue;
61         this.note = note;
62     }
63
64 public static String getNoteByValue(int givenValue) {
65         for (EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL enumType : EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL.values()) {
66             if (givenValue == enumType.getValue()) {
67                 return enumType.getNote();
68             }
69         }
70         return null;
71     }
72
73 public static int getValueByNote(String givenNote) {
74         for (EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL enumType : EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL.values()) {
75             if (givenNote.equals(enumType.getNote())) {
76                 return enumType.getValue();
77             }
78         }
79         return -2;
80     }
81
82 public static EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL getEnum(int value) {
83         for (EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL e : EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL.values()) {
84             if (e.getValue() == value)
85                 return e;
86         }
87         return EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL.EM_XRAY_OBJECT_DETECT_CONFIG_LEVEL_UNKNWON;
88     }
89
90 }