package com.gkhy.huataiFourierSpecialGasMonitor.enums;
|
|
public enum WarningThresholdEnum {
|
|
YELLOW((Integer)1,"黄色预警"),
|
RED((Integer)2,"红色预警"),
|
;
|
|
private Integer code;
|
private String desc;
|
|
WarningThresholdEnum(Integer code, String desc) {
|
this.code = code;
|
this.desc = desc;
|
}
|
|
public Integer getCode() {
|
return code;
|
}
|
|
public void setCode(Integer code) {
|
this.code = code;
|
}
|
|
public String getDesc() {
|
return desc;
|
}
|
|
public void setDesc(String desc) {
|
this.desc = desc;
|
}
|
|
public static String getValue(Integer code){
|
for (WarningThresholdEnum value : WarningThresholdEnum.values()) {
|
if (value.code.equals(code)){
|
return value.desc;
|
}
|
}
|
return null;
|
}
|
}
|