提交 | 用户 | 时间
|
2b47c5
|
1 |
package com.iailab.module.model.common.enums; |
D |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* @author DongYukun |
|
8 |
* @Description |
|
9 |
* @createTime 2024年1月2日 |
|
10 |
*/ |
|
11 |
@Getter |
|
12 |
@AllArgsConstructor |
|
13 |
public enum ModelOutResultType { |
|
14 |
D("double", "double"), |
|
15 |
D1("double[]", "double[]"), |
|
16 |
D2("double[][]", "double[][]"); |
|
17 |
|
|
18 |
private String code; |
|
19 |
private String desc; |
|
20 |
|
|
21 |
public static ModelOutResultType getEumByCode(String code) { |
|
22 |
if (code == null) { |
|
23 |
return null; |
|
24 |
} |
|
25 |
|
|
26 |
for (ModelOutResultType statusEnum : ModelOutResultType.values()) { |
|
27 |
if (statusEnum.getCode().equals(code)) { |
|
28 |
return statusEnum; |
|
29 |
} |
|
30 |
} |
|
31 |
return null; |
|
32 |
} |
|
33 |
} |