package com.zy.core.enums; public enum SteLocaType { NONE(0, "未知"), A(1, "A点"), B(2, "B点"), A_WAITING(3, "A待机点"), B_WAITING(4, "B待机点"), ; public Integer id; public String desc; SteLocaType(Integer id, String desc) { this.id = id; this.desc = desc; } public static SteLocaType get(Short id) { if (null == id) { return null; } for (SteLocaType type : SteLocaType.values()) { if (type.id.equals(id.intValue())) { return type; } } return null; } public static SteLocaType get(SteLocaType type) { if (null == type) { return null; } for (SteLocaType crnStatusType : SteLocaType.values()) { if (crnStatusType == type) { return crnStatusType; } } return null; } }