| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package com.its.vms.domain.enums;
- import java.util.HashMap;
- import java.util.Map;
- public enum eVmsReqBoardPower {
- vms_req_board_power_off (0x00, "0.off"),
- vms_req_board_power_on (0x01, "1.on");
- private final int value;
- private final String string;
- private static final Map<Integer, eVmsReqBoardPower> map;
- static {
- map = new HashMap<>();
- for (eVmsReqBoardPower e : values()) {
- map.put(e.value, e);
- }
- }
- public static eVmsReqBoardPower getValue(int value) {
- return map.get(value);
- }
- public static eVmsReqBoardPower getValue(byte value) {
- int intValue = (value & 0xFF);
- return map.get(intValue);
- }
- eVmsReqBoardPower(int value, String string) {
- this.value = value;
- this.string = string;
- }
- public int getValue() {
- return this.value;
- }
- @Override
- public String toString() {
- return this.string;
- }
- }
|