| | |
| | | */ |
| | | public enum ShuttleStatusType { |
| | | |
| | | IDLE(false, "空闲"), |
| | | BUSY(true, "忙"), |
| | | IDLE((short)0, "空闲"), |
| | | BUSY((short)1, "忙"), |
| | | ; |
| | | |
| | | public Boolean id; |
| | | public Short id; |
| | | public String desc; |
| | | |
| | | ShuttleStatusType(Boolean id,String desc) { |
| | | ShuttleStatusType(Short id,String desc) { |
| | | this.id = id; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static ShuttleStatusType get(Boolean id) { |
| | | public static ShuttleStatusType get(Short id) { |
| | | if (null == id) { |
| | | return null; |
| | | } |
| | | for (ShuttleStatusType type : ShuttleStatusType.values()) { |
| | | if (type.id.equals(id.booleanValue())) { |
| | | if (type.id.equals(id.shortValue())) { |
| | | return type; |
| | | } |
| | | } |