提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 291189 |
|
5 |
* @description 车牌类型 |
|
6 |
* @date 2022/05/30 14:16:15 |
|
7 |
*/ |
|
8 |
public enum EM_NET_PLATE_TYPE { |
|
9 |
/** |
|
10 |
|
|
11 |
*/ |
|
12 |
NET_PLATE_TYPE_UNKNOWN(0, ""), |
|
13 |
/** |
|
14 |
* Normal 蓝牌黑牌 |
|
15 |
*/ |
|
16 |
NET_PLATE_TYPE_NORMAL(1, " Normal 蓝牌黑牌"), |
|
17 |
/** |
|
18 |
* Yellow 黄牌 |
|
19 |
*/ |
|
20 |
NET_PLATE_TYPE_YELLOW(2, " Yellow 黄牌"), |
|
21 |
/** |
|
22 |
* DoubleYellow 双层黄尾牌 |
|
23 |
*/ |
|
24 |
NET_PLATE_TYPE_DOUBLEYELLOW(3, " DoubleYellow 双层黄尾牌"), |
|
25 |
/** |
|
26 |
* Police 警牌 |
|
27 |
*/ |
|
28 |
NET_PLATE_TYPE_POLICE(4, " Police 警牌"), |
|
29 |
/** |
|
30 |
|
|
31 |
*/ |
|
32 |
NET_PLATE_TYPE_WJ(5, ""), |
|
33 |
/** |
|
34 |
|
|
35 |
*/ |
|
36 |
NET_PLATE_TYPE_OUTERGUARD(6, ""), |
|
37 |
/** |
|
38 |
|
|
39 |
*/ |
|
40 |
NET_PLATE_TYPE_DOUBLEOUTERGUARD(7, ""), |
|
41 |
/** |
|
42 |
* SAR 港澳特区号牌 |
|
43 |
*/ |
|
44 |
NET_PLATE_TYPE_SAR(8, " SAR 港澳特区号牌"), |
|
45 |
/** |
|
46 |
* Trainning 教练车号牌 |
|
47 |
*/ |
|
48 |
NET_PLATE_TYPE_TRAINNING(9, " Trainning 教练车号牌"), |
|
49 |
/** |
|
50 |
* Personal 个性号牌 |
|
51 |
*/ |
|
52 |
NET_PLATE_TYPE_PERSONAL(10, " Personal 个性号牌"), |
|
53 |
/** |
|
54 |
* Agri 农用牌 |
|
55 |
*/ |
|
56 |
NET_PLATE_TYPE_AGRI(11, " Agri 农用牌"), |
|
57 |
/** |
|
58 |
* Embassy 使馆号牌 |
|
59 |
*/ |
|
60 |
NET_PLATE_TYPE_EMBASSY(12, " Embassy 使馆号牌"), |
|
61 |
/** |
|
62 |
* Moto 摩托车号牌 |
|
63 |
*/ |
|
64 |
NET_PLATE_TYPE_MOTO(13, " Moto 摩托车号牌"), |
|
65 |
/** |
|
66 |
* Tractor 拖拉机号牌 |
|
67 |
*/ |
|
68 |
NET_PLATE_TYPE_TRACTOR(14, " Tractor 拖拉机号牌"), |
|
69 |
/** |
|
70 |
* OfficialCar 公务车 |
|
71 |
*/ |
|
72 |
NET_PLATE_TYPE_OFFICIALCAR(15, " OfficialCar 公务车"), |
|
73 |
/** |
|
74 |
* PersonalCar 私家车 |
|
75 |
*/ |
|
76 |
NET_PLATE_TYPE_PERSONALCAR(16, " PersonalCar 私家车"), |
|
77 |
/** |
|
78 |
|
|
79 |
*/ |
|
80 |
NET_PLATE_TYPE_WARCAR(17, ""), |
|
81 |
/** |
|
82 |
* Other 其他号牌 |
|
83 |
*/ |
|
84 |
NET_PLATE_TYPE_OTHER(18, " Other 其他号牌"), |
|
85 |
/** |
|
86 |
* Civilaviation 民航号牌 |
|
87 |
*/ |
|
88 |
NET_PLATE_TYPE_CIVILAVIATION(19, " Civilaviation 民航号牌"), |
|
89 |
/** |
|
90 |
* Black 黑牌 |
|
91 |
*/ |
|
92 |
NET_PLATE_TYPE_BLACK(20, " Black 黑牌"), |
|
93 |
/** |
|
94 |
* PureNewEnergyMicroCar 纯电动新能源小车 |
|
95 |
*/ |
|
96 |
NET_PLATE_TYPE_PURENEWENERGYMICROCAR(21, " PureNewEnergyMicroCar 纯电动新能源小车"), |
|
97 |
/** |
|
98 |
* MixedNewEnergyMicroCar 混合新能源小车 |
|
99 |
*/ |
|
100 |
NET_PLATE_TYPE_MIXEDNEWENERGYMICROCAR(22, " MixedNewEnergyMicroCar 混合新能源小车"), |
|
101 |
/** |
|
102 |
* PureNewEnergyLargeCar 纯电动新能源大车 |
|
103 |
*/ |
|
104 |
NET_PLATE_TYPE_PURENEWENERGYLARGECAR(23, " PureNewEnergyLargeCar 纯电动新能源大车"), |
|
105 |
/** |
|
106 |
* MixedNewEnergyLargeCar 混合新能源大车 |
|
107 |
*/ |
|
108 |
NET_PLATE_TYPE_MIXEDNEWENERGYLARGECAR(24, " MixedNewEnergyLargeCar 混合新能源大车"), |
|
109 |
/** |
|
110 |
* Hongkong 香港号牌 |
|
111 |
*/ |
|
112 |
NET_PLATE_TYPE_HONGKONG(25, " Hongkong 香港号牌"), |
|
113 |
/** |
|
114 |
* Makao 澳门号牌 |
|
115 |
*/ |
|
116 |
NET_PLATE_TYPE_MAKAO(26, " Makao 澳门号牌"); |
|
117 |
|
|
118 |
private int value; |
|
119 |
|
|
120 |
private String note; |
|
121 |
|
|
122 |
public String getNote() { |
|
123 |
return note; |
|
124 |
} |
|
125 |
|
|
126 |
public int getValue() { |
|
127 |
return value; |
|
128 |
} |
|
129 |
|
|
130 |
EM_NET_PLATE_TYPE(int givenValue, String note) { |
|
131 |
this.value = givenValue; |
|
132 |
this.note = note; |
|
133 |
} |
|
134 |
|
|
135 |
public static String getNoteByValue(int givenValue) { |
|
136 |
for (EM_NET_PLATE_TYPE enumType : EM_NET_PLATE_TYPE.values()) { |
|
137 |
if (givenValue == enumType.getValue()) { |
|
138 |
return enumType.getNote(); |
|
139 |
} |
|
140 |
} |
|
141 |
return null; |
|
142 |
} |
|
143 |
|
|
144 |
public static int getValueByNote(String givenNote) { |
|
145 |
for (EM_NET_PLATE_TYPE enumType : EM_NET_PLATE_TYPE.values()) { |
|
146 |
if (givenNote.equals(enumType.getNote())) { |
|
147 |
return enumType.getValue(); |
|
148 |
} |
|
149 |
} |
|
150 |
return -1; |
|
151 |
} |
|
152 |
|
|
153 |
public static EM_NET_PLATE_TYPE getEnum(int value) { |
|
154 |
for (EM_NET_PLATE_TYPE e : EM_NET_PLATE_TYPE.values()) { |
|
155 |
if (e.getValue() == value) |
|
156 |
return e; |
|
157 |
} |
|
158 |
return EM_NET_PLATE_TYPE.NET_PLATE_TYPE_UNKNOWN; |
|
159 |
} |
|
160 |
|
|
161 |
} |