提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 251823 |
|
5 |
* @description 支持的梯控制方式类型 |
|
6 |
* @origin autoTool |
|
7 |
* @date 2023/08/24 14:19:16 |
|
8 |
*/ |
|
9 |
public enum EM_SUPPORT_LIFT_CONTROL_TYPES { |
|
10 |
/** |
|
11 |
* 未知 |
|
12 |
*/ |
|
13 |
EM_SUPPORT_LIFT_CONTROL_TYPES_UNKNOWN(0, "未知"), |
|
14 |
/** |
|
15 |
* 本地485协议梯控方式 |
|
16 |
*/ |
|
17 |
EM_SUPPORT_LIFT_CONTROL_TYPES_LOCAL485(1, "本地485协议梯控方式"), |
|
18 |
/** |
|
19 |
* 从门口机联动主门口进行召梯 |
|
20 |
*/ |
|
21 |
EM_SUPPORT_LIFT_CONTROL_TYPES_LINKMAINVTO(2, "从门口机联动主门口进行召梯"), |
|
22 |
/** |
|
23 |
* 联动梯控主机召梯 |
|
24 |
*/ |
|
25 |
EM_SUPPORT_LIFT_CONTROL_TYPES_LINkLIFTCONTROLHOST(3, "联动梯控主机召梯"); |
|
26 |
|
|
27 |
private int value; |
|
28 |
|
|
29 |
private String note; |
|
30 |
|
|
31 |
public String getNote() { |
|
32 |
return note; |
|
33 |
} |
|
34 |
|
|
35 |
public int getValue() { |
|
36 |
return value; |
|
37 |
} |
|
38 |
|
|
39 |
EM_SUPPORT_LIFT_CONTROL_TYPES(int givenValue, String note) { |
|
40 |
this.value = givenValue; |
|
41 |
this.note = note; |
|
42 |
} |
|
43 |
|
|
44 |
public static String getNoteByValue(int givenValue) { |
|
45 |
for (EM_SUPPORT_LIFT_CONTROL_TYPES enumType : EM_SUPPORT_LIFT_CONTROL_TYPES.values()) { |
|
46 |
if (givenValue == enumType.getValue()) { |
|
47 |
return enumType.getNote(); |
|
48 |
} |
|
49 |
} |
|
50 |
return null; |
|
51 |
} |
|
52 |
|
|
53 |
public static int getValueByNote(String givenNote) { |
|
54 |
for (EM_SUPPORT_LIFT_CONTROL_TYPES enumType : EM_SUPPORT_LIFT_CONTROL_TYPES.values()) { |
|
55 |
if (givenNote.equals(enumType.getNote())) { |
|
56 |
return enumType.getValue(); |
|
57 |
} |
|
58 |
} |
|
59 |
return -1; |
|
60 |
} |
|
61 |
} |