提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 260611 |
|
5 |
* @description 是否支持以图搜图 |
|
6 |
* @origin autoTool |
|
7 |
* @date 2023/07/31 09:25:34 |
|
8 |
*/ |
|
9 |
public enum EM_SUPPORT_SEARCH_BY_PIC { |
|
10 |
/** |
|
11 |
* 未知, IVSS, NVR, DVR大概率支持目标以图搜图,IPC-FR不支持 |
|
12 |
*/ |
|
13 |
EM_SUPPORT_SEARCH_BY_PIC_UNKNOWN(0,"未知, IVSS, NVR, DVR大概率支持目标以图搜图,IPC-FR不支持"), |
|
14 |
/** |
|
15 |
* 不支持 |
|
16 |
*/ |
|
17 |
EM_SUPPORT_SEARCH_BY_PIC_UNSUPPORT(1,"不支持"), |
|
18 |
/** |
|
19 |
* 支持 |
|
20 |
*/ |
|
21 |
EM_SUPPORT_SEARCH_BY_PIC_SUPPORT(2,"支持"); |
|
22 |
|
|
23 |
private int value; |
|
24 |
|
|
25 |
private String note; |
|
26 |
|
|
27 |
public String getNote() { |
|
28 |
return note; |
|
29 |
} |
|
30 |
|
|
31 |
public int getValue() { |
|
32 |
return value; |
|
33 |
} |
|
34 |
|
|
35 |
EM_SUPPORT_SEARCH_BY_PIC(int givenValue, String note) { |
|
36 |
this.value = givenValue; |
|
37 |
this.note = note; |
|
38 |
} |
|
39 |
|
|
40 |
public static String getNoteByValue(int givenValue) { |
|
41 |
for (EM_SUPPORT_SEARCH_BY_PIC enumType : EM_SUPPORT_SEARCH_BY_PIC.values()) { |
|
42 |
if (givenValue == enumType.getValue()) { |
|
43 |
return enumType.getNote(); |
|
44 |
} |
|
45 |
} |
|
46 |
return null; |
|
47 |
} |
|
48 |
|
|
49 |
public static int getValueByNote(String givenNote) { |
|
50 |
for (EM_SUPPORT_SEARCH_BY_PIC enumType : EM_SUPPORT_SEARCH_BY_PIC.values()) { |
|
51 |
if (givenNote.equals(enumType.getNote())) { |
|
52 |
return enumType.getValue(); |
|
53 |
} |
|
54 |
} |
|
55 |
return -1; |
|
56 |
} |
|
57 |
|
|
58 |
public static EM_SUPPORT_SEARCH_BY_PIC getEnum(int value) { |
|
59 |
for (EM_SUPPORT_SEARCH_BY_PIC e : EM_SUPPORT_SEARCH_BY_PIC.values()) { |
|
60 |
if (e.getValue() == value) { |
|
61 |
return e; |
|
62 |
} |
|
63 |
} |
|
64 |
return EM_SUPPORT_SEARCH_BY_PIC.EM_SUPPORT_SEARCH_BY_PIC_UNKNOWN; |
|
65 |
} |
|
66 |
|
|
67 |
} |