GG.java 676 Bytes
package com.bsth.data.notice.entity;

public enum GG {
    GG1("0", "雨天路滑,安全出行。"),
    GG2("1", "高峰时段,道路拥堵,请乘客合理安排出行。"),
    GG3("2", "请先下后上,注意乘车安全。");

    private  String code;
    private  String description;

    GG(String code, String description) {
        this.code = code;
        this.description = description;
    }


    public static String getDescription(String number){
        String description ="";
        for (GG e : GG.values()) {
            if(e.code.equals(number)){
                return e.description;
            }
        }
        return description;
    }

}