提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 路人库满时覆盖策略 |
|
7 |
* @date 2021/2/22 |
|
8 |
*/ |
|
9 |
public enum EM_PASSERBY_DB_OVERWRITE_TYPE { |
|
10 |
/** 未知 */ |
|
11 |
EM_OVERWRITE_TYPE_UNKNOWN(-1, "未知"), |
|
12 |
/** 满停止 */ |
|
13 |
EM_OVERWRITE_TYPE_FULL_STOP(0, "满停止"), |
|
14 |
/** 满覆盖 */ |
|
15 |
EM_OVERWRITE_TYPE_FULL_COVERAGE(1, "满覆盖"); |
|
16 |
private int type; |
|
17 |
private String desc; |
|
18 |
|
|
19 |
EM_PASSERBY_DB_OVERWRITE_TYPE(int type, String desc) { |
|
20 |
this.type = type; |
|
21 |
this.desc = desc; |
|
22 |
} |
|
23 |
|
|
24 |
public int getType() { |
|
25 |
return type; |
|
26 |
} |
|
27 |
|
|
28 |
public String getDesc() { |
|
29 |
return desc; |
|
30 |
} |
|
31 |
|
|
32 |
public static EM_PASSERBY_DB_OVERWRITE_TYPE getOverwriteType(int type) { |
|
33 |
for (EM_PASSERBY_DB_OVERWRITE_TYPE overwriteType : EM_PASSERBY_DB_OVERWRITE_TYPE.values()) { |
|
34 |
if (overwriteType.type == type) { |
|
35 |
return overwriteType; |
|
36 |
} |
|
37 |
} |
|
38 |
return EM_OVERWRITE_TYPE_UNKNOWN; |
|
39 |
} |
|
40 |
} |