提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author 291189 |
|
6 |
* @description 姿态类型 |
|
7 |
* @date 2023/02/06 15:24:00 |
|
8 |
*/ |
|
9 |
public enum NET_EM_ATTITUDE_TYPE { |
|
10 |
/** |
|
11 |
未知 |
|
12 |
*/ |
|
13 |
NET_EM_ATTITUDE_TYPE_UNKNOWN(0,"未知"), |
|
14 |
/** |
|
15 |
单手递接 |
|
16 |
*/ |
|
17 |
NET_EM_ATTITUDE_TYPE_ONE_HAND(1,"单手递接"), |
|
18 |
/** |
|
19 |
叉腰 |
|
20 |
*/ |
|
21 |
NET_EM_ATTITUDE_TYPE_AKIMBO(2,"叉腰"), |
|
22 |
/** |
|
23 |
双手抱头 |
|
24 |
*/ |
|
25 |
NET_EM_ATTITUDE_TYPE_HAND_SON_HEAD(3,"双手抱头"), |
|
26 |
/** |
|
27 |
双手抱胸 |
|
28 |
*/ |
|
29 |
NET_EM_ATTITUDE_TYPE_HAND_SON_CHEST(4,"双手抱胸"), |
|
30 |
/** |
|
31 |
撞墙 |
|
32 |
*/ |
|
33 |
NET_EM_ATTITUDE_TYPE_HIT_WALL(5,"撞墙"), |
|
34 |
/** |
|
35 |
弯腰 |
|
36 |
*/ |
|
37 |
NET_EM_ATTITUDE_TYPE_BEND(6,"弯腰"), |
|
38 |
/** |
|
39 |
坐状态 |
|
40 |
*/ |
|
41 |
NET_EM_ATTITUDE_TYPE_SITTING(7,"坐状态"), |
|
42 |
/** |
|
43 |
站状态 |
|
44 |
*/ |
|
45 |
NET_EM_ATTITUDE_TYPE_STANDING(8,"站状态"), |
|
46 |
/** |
|
47 |
坐下 |
|
48 |
*/ |
|
49 |
NET_EM_ATTITUDE_TYPE_SIT_DOWN(9,"坐下"), |
|
50 |
/** |
|
51 |
起立 |
|
52 |
*/ |
|
53 |
NET_EM_ATTITUDE_TYPE_STAND_UP(10,"起立"), |
|
54 |
/** |
|
55 |
趴桌子 |
|
56 |
*/ |
|
57 |
NET_EM_ATTITUDE_TYPE_ON_TABLE(11,"趴桌子"), |
|
58 |
/** |
|
59 |
回头 |
|
60 |
*/ |
|
61 |
NET_EM_ATTITUDE_TYPE_LOOK_BACK(12,"回头"), |
|
62 |
/** |
|
63 |
传递 |
|
64 |
*/ |
|
65 |
NET_EM_ATTITUDE_TYPE_DELIVERY(13,"传递"), |
|
66 |
/** |
|
67 |
东张西望 |
|
68 |
*/ |
|
69 |
NET_EM_ATTITUDE_TYPE_GAZE_AROUND(14,"东张西望"), |
|
70 |
/** |
|
71 |
手放桌下偷看 |
|
72 |
*/ |
|
73 |
NET_EM_ATTITUDE_TYPE_HAND_DOWN_PEEP(15,"手放桌下偷看"), |
|
74 |
/** |
|
75 |
捡东西 |
|
76 |
*/ |
|
77 |
NET_EM_ATTITUDE_TYPE_PICK_UP(16,"捡东西"), |
|
78 |
/** |
|
79 |
举手 |
|
80 |
*/ |
|
81 |
NET_EM_ATTITUDE_TYPE_HAND_UP(17,"举手"), |
|
82 |
/** |
|
83 |
书写 |
|
84 |
*/ |
|
85 |
NET_EM_ATTITUDE_TYPE_WRITE(18,"书写"); |
|
86 |
|
|
87 |
private int value; |
|
88 |
|
|
89 |
private String note; |
|
90 |
|
|
91 |
public String getNote() { |
|
92 |
return note; |
|
93 |
} |
|
94 |
|
|
95 |
public int getValue() { |
|
96 |
return value; |
|
97 |
} |
|
98 |
|
|
99 |
NET_EM_ATTITUDE_TYPE(int givenValue, String note) { |
|
100 |
this.value = givenValue; |
|
101 |
this.note = note; |
|
102 |
} |
|
103 |
|
|
104 |
public static String getNoteByValue(int givenValue) { |
|
105 |
for (NET_EM_ATTITUDE_TYPE enumType : NET_EM_ATTITUDE_TYPE.values()) { |
|
106 |
if (givenValue == enumType.getValue()) { |
|
107 |
return enumType.getNote(); |
|
108 |
} |
|
109 |
} |
|
110 |
return null; |
|
111 |
} |
|
112 |
|
|
113 |
public static int getValueByNote(String givenNote) { |
|
114 |
for (NET_EM_ATTITUDE_TYPE enumType : NET_EM_ATTITUDE_TYPE.values()) { |
|
115 |
if (givenNote.equals(enumType.getNote())) { |
|
116 |
return enumType.getValue(); |
|
117 |
} |
|
118 |
} |
|
119 |
return -1; |
|
120 |
} |
|
121 |
|
|
122 |
public static NET_EM_ATTITUDE_TYPE getEnum(int value) { |
|
123 |
for (NET_EM_ATTITUDE_TYPE e : NET_EM_ATTITUDE_TYPE.values()) { |
|
124 |
if (e.getValue() == value) |
|
125 |
return e; |
|
126 |
} |
|
127 |
return NET_EM_ATTITUDE_TYPE.NET_EM_ATTITUDE_TYPE_UNKNOWN; |
|
128 |
} |
|
129 |
|
|
130 |
} |