提交 | 用户 | 时间
|
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_ASG_WORK_MODE { |
|
10 |
/** 未知 */ |
|
11 |
EM_ASG_WORK_MODE_UNKNOWN(-1, "未知"), |
|
12 |
/** 常闭模式 */ |
|
13 |
EM_ASG_WORK_MODE_CLOSE(0, "常闭模式"), |
|
14 |
EM_ASG_WORK_MODE_OPEN(1, "常开模式"); |
|
15 |
|
|
16 |
private int mode; |
|
17 |
private String desc; |
|
18 |
|
|
19 |
EM_ASG_WORK_MODE(int mode, String desc) { |
|
20 |
this.mode = mode; |
|
21 |
this.desc = desc; |
|
22 |
} |
|
23 |
|
|
24 |
public static EM_ASG_WORK_MODE getAsgWorkMode(int mode) { |
|
25 |
for (EM_ASG_WORK_MODE workMode : EM_ASG_WORK_MODE.values()) { |
|
26 |
if (workMode.mode == mode) { |
|
27 |
return workMode; |
|
28 |
} |
|
29 |
} |
|
30 |
return EM_ASG_WORK_MODE_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 |
} |