提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
|
|
4 |
public enum NET_EM_LXSJ_SHOWMODE { |
|
5 |
/**未知*/ |
|
6 |
NET_EM_LXSJ_SHOWMODE_UNKNOWN(-1,"未知"), |
|
7 |
/**立即显示*/ |
|
8 |
NET_EM_LXSJ_SHOWMODE_IMMEDIATELY(1,"立即显示"), |
|
9 |
/**向左移动*/ |
|
10 |
NET_EM_LXSJ_SHOWMODE_TO_LEFT(2,"向左移动"), |
|
11 |
/**向上移动*/ |
|
12 |
NET_EM_LXSJ_SHOWMODE_TO_TOP(3,"向上移动"), |
|
13 |
/**向右移动*/ |
|
14 |
NET_EM_LXSJ_SHOWMODE_TO_RIGHT(4,"向右移动"), |
|
15 |
/**向下移动*/ |
|
16 |
NET_EM_LXSJ_SHOWMODE_TO_BOTTOM(5,"向下移动"), |
|
17 |
/**闪烁*/ |
|
18 |
NET_EM_LXSJ_SHOWMODE_BLINK(6,"闪烁"), |
|
19 |
/**向上连移*/ |
|
20 |
NET_EM_LXSJ_SHOWMODE_TO_TOP_CONTINUOUS(94,"向上连移"), |
|
21 |
/**向下连移*/ |
|
22 |
NET_EM_LXSJ_SHOWMODE_TO_BOTTOM_CONTINUOUS(95,"向下连移"), |
|
23 |
/**向右连移*/ |
|
24 |
NET_EM_LXSJ_SHOWMODE_TO_RIGHT_CONTINUOUS(96,"向右连移"), |
|
25 |
/**向左连移*/ |
|
26 |
NET_EM_LXSJ_SHOWMODE_TO_LEFT_CONTINUOUS(97,"向左连移"); |
|
27 |
|
|
28 |
private int value; |
|
29 |
|
|
30 |
private String note; |
|
31 |
|
|
32 |
public String getNote() { |
|
33 |
return note; |
|
34 |
} |
|
35 |
|
|
36 |
public int getValue() { |
|
37 |
return value; |
|
38 |
} |
|
39 |
|
|
40 |
NET_EM_LXSJ_SHOWMODE(int givenValue, String note) { |
|
41 |
this.value = givenValue; |
|
42 |
this.note = note; |
|
43 |
} |
|
44 |
|
|
45 |
public static String getNoteByValue(int givenValue) { |
|
46 |
for (NET_EM_LXSJ_SHOWMODE enumType : NET_EM_LXSJ_SHOWMODE.values()) { |
|
47 |
if (givenValue == enumType.getValue()) { |
|
48 |
return enumType.getNote(); |
|
49 |
} |
|
50 |
} |
|
51 |
return null; |
|
52 |
} |
|
53 |
|
|
54 |
public static int getValueByNote(String givenNote) { |
|
55 |
for (NET_EM_LXSJ_SHOWMODE enumType : NET_EM_LXSJ_SHOWMODE.values()) { |
|
56 |
if (givenNote.equals(enumType.getNote())) { |
|
57 |
return enumType.getValue(); |
|
58 |
} |
|
59 |
} |
|
60 |
return -1; |
|
61 |
} |
|
62 |
|
|
63 |
public static NET_EM_LXSJ_SHOWMODE getEnum(int value) { |
|
64 |
for (NET_EM_LXSJ_SHOWMODE e : NET_EM_LXSJ_SHOWMODE.values()) { |
|
65 |
if (e.getValue() == value) |
|
66 |
return e; |
|
67 |
} |
|
68 |
return NET_EM_LXSJ_SHOWMODE.NET_EM_LXSJ_SHOWMODE_UNKNOWN; |
|
69 |
} |
|
70 |
|
|
71 |
} |