1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| package com.zy.ai.domain.autotune;
|
| public enum AutoTuneTargetType {
| SYS_CONFIG("sys_config"),
| STATION("station"),
| CRN("crn"),
| DUAL_CRN("dual_crn");
|
| private final String code;
|
| AutoTuneTargetType(String code) {
| this.code = code;
| }
|
| public String getCode() {
| return code;
| }
|
| public static AutoTuneTargetType fromCode(String code) {
| if (code == null) {
| return null;
| }
| for (AutoTuneTargetType targetType : values()) {
| if (targetType.code.equals(code.trim())) {
| return targetType;
| }
| }
| return null;
| }
| }
|
|