提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 文件所属的模式 |
|
7 |
* @date 2020/9/10 |
|
8 |
*/ |
|
9 |
public enum EM_PLAY_WITH_MODE { |
|
10 |
/** |
|
11 |
* 未知 |
|
12 |
*/ |
|
13 |
EM_PLAY_WITH_MODE_UNKNOWN(0, "未知"), |
|
14 |
/** |
|
15 |
* 识别模式 |
|
16 |
*/ |
|
17 |
EM_PLAY_WITH_MODE_RECOGNITION(1, "识别"), |
|
18 |
/** |
|
19 |
* 信息发布模式 |
|
20 |
*/ |
|
21 |
EM_PLAY_WITH_MODE_INFORMATION_RELEASE(2, "信息发布"), |
|
22 |
/** |
|
23 |
* 主界面模式 |
|
24 |
*/ |
|
25 |
EM_PLAY_WITH_MODE_MAIN_INTERFACE(3, "主界面"); |
|
26 |
|
|
27 |
private EM_PLAY_WITH_MODE(int mode, String desc) { |
|
28 |
this.mode = mode; |
|
29 |
this.desc = desc; |
|
30 |
} |
|
31 |
|
|
32 |
private int mode; |
|
33 |
private String desc; |
|
34 |
|
|
35 |
public int getMode() { |
|
36 |
return mode; |
|
37 |
} |
|
38 |
|
|
39 |
public void setMode(int mode) { |
|
40 |
this.mode = mode; |
|
41 |
} |
|
42 |
|
|
43 |
public String getDesc() { |
|
44 |
return desc; |
|
45 |
} |
|
46 |
|
|
47 |
public void setDesc(String desc) { |
|
48 |
this.desc = desc; |
|
49 |
} |
|
50 |
|
|
51 |
public static EM_PLAY_WITH_MODE getPlayMode(int mode) { |
|
52 |
for (EM_PLAY_WITH_MODE playMode : EM_PLAY_WITH_MODE.values()) { |
|
53 |
if (playMode.getMode() == mode) { |
|
54 |
return playMode; |
|
55 |
} |
|
56 |
} |
|
57 |
return null; |
|
58 |
} |
|
59 |
} |