heheng
2024-11-07 37b0d2560607d1e0bfd5247a59a154704cac60f8
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.gkhy.labRiskManage.domain.experiment.enums;
 
import java.util.HashMap;
import java.util.Map;
 
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2022/12/20
 * @time: 17:31
 */
public enum ExperimentStagingEnum {
 
    SAVE((byte)1,"保存"),
    NOT_SAVE((byte)2,"暂存"),
    ;
 
    private Byte value;
    private String dec;
 
    ExperimentStagingEnum(Byte value, String dec) {
        this.value = value;
        this.dec = dec;
    }
 
    public Byte getValue() {
        return value;
    }
 
    public void setValue(Byte value) {
        this.value = value;
    }
 
    public static Map<Byte, ExperimentStagingEnum> getMap() {
        return map;
    }
 
    public static void setMap(Map<Byte, ExperimentStagingEnum> map) {
        ExperimentStagingEnum.map = map;
    }
 
    public String getDec() {
        return dec;
    }
 
    public void setDec(String dec) {
        this.dec = dec;
    }
 
    static Map<Byte, ExperimentStagingEnum> map;
 
    static {
        map = new HashMap<>();
        for(ExperimentStagingEnum e : ExperimentStagingEnum.values()){
            map.put(e.value,e);
        }
    }
 
    public static ExperimentStagingEnum prase(Byte value){
        return map.get(value);
    }
}