package com.zy.core.enums; /** * RGV走行定位枚举 */ public enum RgvWalkPosType { POSITION((short) 0, "在定位"), NONE((short) 1, "不在定位"), ; public Short id; public String desc; RgvWalkPosType(Short id, String desc) { this.id = id; this.desc = desc; } public static RgvWalkPosType get(Short id) { if (null == id) { return null; } for (RgvWalkPosType type : RgvWalkPosType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static RgvWalkPosType get(RgvWalkPosType type) { if (null == type) { return null; } for (RgvWalkPosType type1 : RgvWalkPosType.values()) { if (type1 == type) { return type1; } } return null; } }