skyouc
4 天以前 bcf39531dcfaea85297312405fbecc7eebccf7d0
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
package com.vincent.rsf.server.system.enums;
 
import com.vincent.rsf.framework.exception.CoolException;
 
public enum ConfigType {
 
    BOOLEAN(1),
    NUMBER(2),
    STRING(3),
    JSON(4),
    DATE(5),
    ;
 
    public int type;
 
    ConfigType(int type) {
        this.type = type;
    }
 
    public static ConfigType query(int type) {
        for (ConfigType value : ConfigType.values()) {
            if (type == value.type) {
                return value;
            }
        }
        throw new CoolException("ConfigType Error!");
    }
 
}