package com.its.vms.domain.enums;

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

public enum eVmsProvideType {

    provide_static_cycle (1, "1.정보가공 완료"),
    provide_mode_change  (2, "2.운영모드 변경");

    private final int value;
    private final String string;

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

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

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

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

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