提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author 291189 |
|
6 |
* @description 雨棚(伞)类型 |
|
7 |
* @origin autoTool |
|
8 |
* @date 2023/02/14 20:11:39 |
|
9 |
*/ |
|
10 |
public enum EM_RAIN_SHED_TYPE { |
|
11 |
/** |
|
12 |
无 |
|
13 |
*/ |
|
14 |
EM_RAIN_SHED_TYPE_NONE(-1,"无"), |
|
15 |
/** |
|
16 |
不撑伞 |
|
17 |
*/ |
|
18 |
EM_RAIN_SHED_TYPE_NO_UMBRELLA(0,"不撑伞"), |
|
19 |
/** |
|
20 |
人非手撑伞 |
|
21 |
*/ |
|
22 |
EM_RAIN_SHED_TYPE_NOT_PEOPLE_HOLD(1,"人非手撑伞"), |
|
23 |
/** |
|
24 |
未知 |
|
25 |
*/ |
|
26 |
EM_RAIN_SHED_TYPE_UNKOWN(2,"未知"), |
|
27 |
/** |
|
28 |
非机动车装载雨伞 |
|
29 |
*/ |
|
30 |
EM_RAIN_SHED_TYPE_NO_MOTOR_UMBRELLA(3,"非机动车装载雨伞"), |
|
31 |
/** |
|
32 |
非机动车装载雨棚 |
|
33 |
*/ |
|
34 |
EM_RAIN_SHED_TYPE_NO_MOTOR_CANOPY(4,"非机动车装载雨棚"); |
|
35 |
|
|
36 |
private int value; |
|
37 |
|
|
38 |
private String note; |
|
39 |
|
|
40 |
public String getNote() { |
|
41 |
return note; |
|
42 |
} |
|
43 |
|
|
44 |
public int getValue() { |
|
45 |
return value; |
|
46 |
} |
|
47 |
|
|
48 |
EM_RAIN_SHED_TYPE(int givenValue, String note) { |
|
49 |
this.value = givenValue; |
|
50 |
this.note = note; |
|
51 |
} |
|
52 |
|
|
53 |
public static String getNoteByValue(int givenValue) { |
|
54 |
for (EM_RAIN_SHED_TYPE enumType : EM_RAIN_SHED_TYPE.values()) { |
|
55 |
if (givenValue == enumType.getValue()) { |
|
56 |
return enumType.getNote(); |
|
57 |
} |
|
58 |
} |
|
59 |
return null; |
|
60 |
} |
|
61 |
|
|
62 |
public static int getValueByNote(String givenNote) { |
|
63 |
for (EM_RAIN_SHED_TYPE enumType : EM_RAIN_SHED_TYPE.values()) { |
|
64 |
if (givenNote.equals(enumType.getNote())) { |
|
65 |
return enumType.getValue(); |
|
66 |
} |
|
67 |
} |
|
68 |
return -2; |
|
69 |
} |
|
70 |
|
|
71 |
public static EM_RAIN_SHED_TYPE getEnum(int value) { |
|
72 |
for (EM_RAIN_SHED_TYPE e : EM_RAIN_SHED_TYPE.values()) { |
|
73 |
if (e.getValue() == value) |
|
74 |
return e; |
|
75 |
} |
|
76 |
return EM_RAIN_SHED_TYPE.EM_RAIN_SHED_TYPE_NONE; |
|
77 |
} |
|
78 |
|
|
79 |
} |