提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 闸机断电以后门摆动放向 |
|
7 |
* @date 2021/2/7 |
|
8 |
*/ |
|
9 |
public enum EM_DIRECTION_AFTER_POWER_OFF { |
|
10 |
/** 未知 */ |
|
11 |
EM_DIRECTION_AFTER_POWER_OFF_UNKNOWN(-1, "未知"), |
|
12 |
/** 进门方向 */ |
|
13 |
EM_DIRECTION_AFTER_POWER_OFF_IN(0, "进门方向"), |
|
14 |
/** 出门方向 */ |
|
15 |
EM_DIRECTION_AFTER_POWER_OFF_OUT(1, "出门方向"); |
|
16 |
private int mode; |
|
17 |
private String desc; |
|
18 |
|
|
19 |
EM_DIRECTION_AFTER_POWER_OFF(int mode, String desc) { |
|
20 |
this.mode = mode; |
|
21 |
this.desc = desc; |
|
22 |
} |
|
23 |
|
|
24 |
public static EM_DIRECTION_AFTER_POWER_OFF getEmDirectionAfterPowerOff(int mode) { |
|
25 |
for (EM_DIRECTION_AFTER_POWER_OFF powerOff : EM_DIRECTION_AFTER_POWER_OFF.values()) { |
|
26 |
if (powerOff.mode == mode) { |
|
27 |
return powerOff; |
|
28 |
} |
|
29 |
} |
|
30 |
return EM_DIRECTION_AFTER_POWER_OFF_UNKNOWN; |
|
31 |
} |
|
32 |
|
|
33 |
public int getMode() { |
|
34 |
return mode; |
|
35 |
} |
|
36 |
|
|
37 |
public void setMode(int mode) { |
|
38 |
this.mode = mode; |
|
39 |
} |
|
40 |
|
|
41 |
public String getDesc() { |
|
42 |
return desc; |
|
43 |
} |
|
44 |
|
|
45 |
public void setDesc(String desc) { |
|
46 |
this.desc = desc; |
|
47 |
} |
|
48 |
} |