package com.its.vms.domain;

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

public enum eVmsTextAlign {

    text_align_left   ( 0, "0:LEFT"),
    text_align_right  ( 1, "1:RIGHT"),
    text_align_center ( 2, "2:CENTER");

    private final int value;
    private final String string;

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

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

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

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