All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.event.enums.CategoryEnums Maven / Gradle / Ivy

There is a newer version: 1.0.13.7
Show newest version
package com.dahuatech.icc.event.enums;

import com.dahuatech.icc.util.StringUtils;

/**
 * 事件大类枚举
 */
public enum CategoryEnums {
   alarm("alarm","报警事件") ,
    business("business","业务事件") ,
    perception("perception","感知类事件") ,
    state("state","状态事件") ,
    ;
    public String code;
    public String msg;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    CategoryEnums(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public static boolean isRight(String code){
        if(StringUtils.isEmpty(code)){
            return false;
        }
        for(CategoryEnums item : CategoryEnums.values()){
            if(code.equals(item.code)){
                return true;
            }
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy