package com.its.vms.domain.enums;

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

public enum eVmsFormObjectId {

    OBJ_RealTimeDisplay     (  1,  "1.실시간정보표출"),
    OBJ_ScheduledDisplay    (  2,  "2.계획된정보표출"),
    OBJ_DownloadGraphicData (  3,  "3.그래픽데이터 다운로드"),
    OBJ_StatusControl       (  4,  "4.상태제어"),
    OBJ_StatusSetting       (  5,  "5.상태설정"),
    OBJ_GeneralStatus       (  6,  "6.기본상태정보"),
    OBJ_PowerStatus         (  7,  "7.전원상태정보"),
    OBJ_ModuleStatus        (  8,  "8.모듈상태정보"),
    OBJ_DotStatus           (  9,  "9.도트상태정보"),
    OBJ_ScreenStatus        ( 10,  "10.표출상태정보"),
    OBJ_DisplayingData      ( 11,  "11.표출정보"),
    OBJ_RealtimeFtpDisplay  ( 12,  "12.FTP 표출정보");

    private final int value;
    private final String string;

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

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

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

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

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