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!"); } }