package com.its.vms.domain.enums;

import java.util.HashMap;
import java.util.Map;

public enum eVmsEvehicleFormType {

    eEVehicleFormOnMove       ( 0,  "0.운행중,"),
    eEVehicleFormEndOperation ( 1,  "1.운행종료");

    private final int value;
    private final String string;

    private static final Map<Integer, eVmsEvehicleFormType> map;
    static {
        map = new HashMap<>();
        for (eVmsEvehicleFormType e : values()) {
            map.put(e.value, e);
        }
    }

    public static eVmsEvehicleFormType getValue(int value) {
        return map.get(value);
    }
    public static eVmsEvehicleFormType getValue(byte value) {
        int intValue = (value & 0x0F);
        return map.get(intValue);
    }

    eVmsEvehicleFormType(int value, String string) {
        this.value  = value;
        this.string = string;
    }

    public int getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.string;
    }
}
