提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author 291189 |
|
6 |
* @description 路面状况等级 |
|
7 |
* @origin autoTool |
|
8 |
* @date 2023/06/16 10:02:52 |
|
9 |
*/ |
|
10 |
public enum EM_ROAD_LEVEL { |
|
11 |
/** |
|
12 |
未知 |
|
13 |
*/ |
|
14 |
EM_ROAD_UNKNOWN_LEVEL(-1,"未知"), |
|
15 |
/** |
|
16 |
0: 纵向裂纹 |
|
17 |
*/ |
|
18 |
EM_ROAD_ZERO_LEVEL(0,"0: 纵向裂纹"), |
|
19 |
/** |
|
20 |
1: 横向裂纹 |
|
21 |
*/ |
|
22 |
EM_ROAD_ONE_LEVEL(1,"1: 横向裂纹"), |
|
23 |
/** |
|
24 |
2: 鳄鱼裂纹 |
|
25 |
*/ |
|
26 |
EM_ROAD_TWO_LEVEL(2,"2: 鳄鱼裂纹"), |
|
27 |
/** |
|
28 |
3: 槽纹 |
|
29 |
*/ |
|
30 |
EM_ROAD_THREE_LEVEL(3,"3: 槽纹"), |
|
31 |
/** |
|
32 |
4: 车辙纹 |
|
33 |
*/ |
|
34 |
EM_ROAD_FOUR_LEVEL(4,"4: 车辙纹"), |
|
35 |
/** |
|
36 |
5: 纵向修复纹 |
|
37 |
*/ |
|
38 |
EM_ROAD_FIVE_LEVEL(5,"5: 纵向修复纹"), |
|
39 |
/** |
|
40 |
6: 横向修复纹 |
|
41 |
*/ |
|
42 |
EM_ROAD_SIX_LEVEL(6,"6: 横向修复纹"); |
|
43 |
|
|
44 |
private int value; |
|
45 |
|
|
46 |
private String note; |
|
47 |
|
|
48 |
public String getNote() { |
|
49 |
return note; |
|
50 |
} |
|
51 |
|
|
52 |
public int getValue() { |
|
53 |
return value; |
|
54 |
} |
|
55 |
|
|
56 |
EM_ROAD_LEVEL(int givenValue, String note) { |
|
57 |
this.value = givenValue; |
|
58 |
this.note = note; |
|
59 |
} |
|
60 |
|
|
61 |
public static String getNoteByValue(int givenValue) { |
|
62 |
for (EM_ROAD_LEVEL enumType : EM_ROAD_LEVEL.values()) { |
|
63 |
if (givenValue == enumType.getValue()) { |
|
64 |
return enumType.getNote(); |
|
65 |
} |
|
66 |
} |
|
67 |
return null; |
|
68 |
} |
|
69 |
|
|
70 |
public static int getValueByNote(String givenNote) { |
|
71 |
for (EM_ROAD_LEVEL enumType : EM_ROAD_LEVEL.values()) { |
|
72 |
if (givenNote.equals(enumType.getNote())) { |
|
73 |
return enumType.getValue(); |
|
74 |
} |
|
75 |
} |
|
76 |
return -2; |
|
77 |
} |
|
78 |
|
|
79 |
public static EM_ROAD_LEVEL getEnum(int value) { |
|
80 |
for (EM_ROAD_LEVEL e : EM_ROAD_LEVEL.values()) { |
|
81 |
if (e.getValue() == value) |
|
82 |
return e; |
|
83 |
} |
|
84 |
return EM_ROAD_LEVEL.EM_ROAD_UNKNOWN_LEVEL; |
|
85 |
} |
|
86 |
|
|
87 |
} |