package com.its.op.model.enums; import java.util.HashMap; import java.util.Map; // 소통정보 등급 public enum eCmtrGradCd implements ICodeValue { LTC0("LTC0", "[LTC0] 정보없음"), LTC1("LTC1", "[LTC1] 원활"), LTC2("LTC2", "[LTC2] 지체"), LTC3("LTC3", "[LTC3] 정체"); private final String code; private final String value; private static final Map map; static { map = new HashMap<>(); for (eCmtrGradCd e : values()) { map.put(e.code, e); } } eCmtrGradCd(String code, String value) { this.code = code; this.value = value; } @Override public String getCode() { return this.code; } @Override public String getValue() { return this.value; } @Override public String getUnknown() { return "LTC0"; } public static String findValue(String code) { return map.get(code).getValue(); } }