提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
public enum EM_FACE_CHECK { |
|
4 |
EM_FACE_CHECK_UNKNOWN (-1,"未知"), // 未知 |
|
5 |
EM_FACE_CHECK_NODATA(0,"该人员无人脸数据"), // 该人员无人脸数据 |
|
6 |
EM_FACE_CHECK_CONSISTENT(1,"刷卡和人脸人员一致"), // 刷卡和人脸人员一致 |
|
7 |
EM_FACE_CHECK_NOT_CONSISTENT(2,"刷卡和人脸人员不一致"); // 刷卡和人脸人员不一致 |
|
8 |
|
|
9 |
private final int value; |
|
10 |
private final String note; |
|
11 |
|
|
12 |
EM_FACE_CHECK(int givenValue, String note) { |
|
13 |
this.value = givenValue; |
|
14 |
this.note = note; |
|
15 |
} |
|
16 |
|
|
17 |
public String getNote() { |
|
18 |
return note; |
|
19 |
} |
|
20 |
|
|
21 |
public int getValue() { |
|
22 |
return value; |
|
23 |
} |
|
24 |
|
|
25 |
public static String getNoteByValue(int givenValue) { |
|
26 |
for (EM_FACE_CHECK enumType : EM_FACE_CHECK.values()) { |
|
27 |
if (givenValue == enumType.getValue()) { |
|
28 |
return enumType.getNote(); |
|
29 |
} |
|
30 |
} |
|
31 |
return null; |
|
32 |
} |
|
33 |
|
|
34 |
public static int getValueByNote(String givenNote) { |
|
35 |
for (EM_FACE_CHECK enumType : EM_FACE_CHECK.values()) { |
|
36 |
if (givenNote.equals(enumType.getNote())) { |
|
37 |
return enumType.getValue(); |
|
38 |
} |
|
39 |
} |
|
40 |
return -1; |
|
41 |
} |
|
42 |
|
|
43 |
public static EM_EVENT_LEVEL getEnum(int value) { |
|
44 |
for (EM_EVENT_LEVEL e : EM_EVENT_LEVEL.values()) { |
|
45 |
if (e.getValue() == value) |
|
46 |
return e; |
|
47 |
} |
|
48 |
return EM_EVENT_LEVEL.EM_EVENT_LEVEL_UNKNOWN; |
|
49 |
} |
|
50 |
} |