package com.its.vms.domain.enums;

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

public enum eVmsTextThickness {

    font_thickness_normal ( 0, "0.보통"),
    font_thickness_bold   ( 1, "1.굵게");

    private final int value;
    private final String string;

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

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

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

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

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