提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 通道宽度 |
|
7 |
* @date 2021/2/7 |
|
8 |
*/ |
|
9 |
public enum EM_CHANNEL_WIDTH { |
|
10 |
/** 未知 */ |
|
11 |
EM_CHANNEL_WIDTH_UNKNOWN(-1, "未知"), |
|
12 |
/** 600mm */ |
|
13 |
EM_CHANNEL_WIDTH_600(0, "600mm"), |
|
14 |
/** 700mm */ |
|
15 |
EM_CHANNEL_WIDTH_700(1, "700mm"), |
|
16 |
/** 800mm */ |
|
17 |
EM_CHANNEL_WIDTH_800(2, "800mm"), |
|
18 |
/** 900mm */ |
|
19 |
EM_CHANNEL_WIDTH_900(3, "900mm"), |
|
20 |
/** 1000mm */ |
|
21 |
EM_CHANNEL_WIDTH_1000(4, "1000mm"), |
|
22 |
/** 1100mm */ |
|
23 |
EM_CHANNEL_WIDTH_1100(5, "1100mm"), |
|
24 |
/** 1200mm */ |
|
25 |
EM_CHANNEL_WIDTH_1200(6, "1200mm"); |
|
26 |
private int emWidth; |
|
27 |
private String desc; |
|
28 |
|
|
29 |
EM_CHANNEL_WIDTH(int emWidth, String desc) { |
|
30 |
this.emWidth = emWidth; |
|
31 |
this.desc = desc; |
|
32 |
} |
|
33 |
|
|
34 |
public int getEmWidth() { |
|
35 |
return emWidth; |
|
36 |
} |
|
37 |
|
|
38 |
public void setEmWidth(int emWidth) { |
|
39 |
this.emWidth = emWidth; |
|
40 |
} |
|
41 |
|
|
42 |
public String getDesc() { |
|
43 |
return desc; |
|
44 |
} |
|
45 |
|
|
46 |
public void setDesc(String desc) { |
|
47 |
this.desc = desc; |
|
48 |
} |
|
49 |
public static EM_CHANNEL_WIDTH getChannelWidth(int emWidth){ |
|
50 |
for (EM_CHANNEL_WIDTH channelWidth :EM_CHANNEL_WIDTH.values() ) { |
|
51 |
if(channelWidth.emWidth==emWidth){ |
|
52 |
return channelWidth; |
|
53 |
} |
|
54 |
} |
|
55 |
return EM_CHANNEL_WIDTH_UNKNOWN; |
|
56 |
} |
|
57 |
} |