/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

package com.pullenti.unitext.internal.uni;

// Типы нумерации
public class UniTextGenNumType implements Comparable<UniTextGenNumType> {

    public static final UniTextGenNumType BULLET; // 0

    public static final UniTextGenNumType DECIMAL; // 1

    public static final UniTextGenNumType UPPERROMAN; // 2

    public static final UniTextGenNumType LOWERROMAN; // 3

    public static final UniTextGenNumType UPPERLETTER; // 4

    public static final UniTextGenNumType LOWERLETTER; // 5

    public static final UniTextGenNumType UPPERCYRLETTER; // 6

    public static final UniTextGenNumType LOWERCYRLETTER; // 7


    public int value() { return m_val; }
    private int m_val;
    private String m_str;
    private UniTextGenNumType(int val, String str) { m_val = val; m_str = str; }
    @Override
    public String toString() {
        if(m_str != null) return m_str;
        return ((Integer)m_val).toString();
    }
    @Override
    public int hashCode() {
        return (int)m_val;
    }
    @Override
    public int compareTo(UniTextGenNumType v) {
        if(m_val < v.m_val) return -1;
        if(m_val > v.m_val) return 1;
        return 0;
    }
    private static java.util.HashMap<Integer, UniTextGenNumType> mapIntToEnum; 
    private static java.util.HashMap<String, UniTextGenNumType> mapStringToEnum; 
    private static UniTextGenNumType[] m_Values; 
    private static java.util.Collection<Integer> m_Keys; 
    public static UniTextGenNumType of(int val) {
        if (mapIntToEnum.containsKey(val)) return mapIntToEnum.get(val);
        UniTextGenNumType item = new UniTextGenNumType(val, ((Integer)val).toString());
        mapIntToEnum.put(val, item);
        mapStringToEnum.put(item.m_str.toUpperCase(), item);
        return item; 
    }
    public static UniTextGenNumType of(String str) {
        str = str.toUpperCase(); 
        if (mapStringToEnum.containsKey(str)) return mapStringToEnum.get(str);
        return null; 
    }
    public static boolean isDefined(Object val) {
        if(val instanceof Integer) return m_Keys.contains((Integer)val); 
        return false; 
    }
    public static UniTextGenNumType[] getValues() {
        return m_Values; 
    }
    static {
        mapIntToEnum = new java.util.HashMap<Integer, UniTextGenNumType>();
        mapStringToEnum = new java.util.HashMap<String, UniTextGenNumType>();
        BULLET = new UniTextGenNumType(0, "BULLET");
        mapIntToEnum.put(BULLET.value(), BULLET);
        mapStringToEnum.put(BULLET.m_str.toUpperCase(), BULLET);
        DECIMAL = new UniTextGenNumType(1, "DECIMAL");
        mapIntToEnum.put(DECIMAL.value(), DECIMAL);
        mapStringToEnum.put(DECIMAL.m_str.toUpperCase(), DECIMAL);
        UPPERROMAN = new UniTextGenNumType(2, "UPPERROMAN");
        mapIntToEnum.put(UPPERROMAN.value(), UPPERROMAN);
        mapStringToEnum.put(UPPERROMAN.m_str.toUpperCase(), UPPERROMAN);
        LOWERROMAN = new UniTextGenNumType(3, "LOWERROMAN");
        mapIntToEnum.put(LOWERROMAN.value(), LOWERROMAN);
        mapStringToEnum.put(LOWERROMAN.m_str.toUpperCase(), LOWERROMAN);
        UPPERLETTER = new UniTextGenNumType(4, "UPPERLETTER");
        mapIntToEnum.put(UPPERLETTER.value(), UPPERLETTER);
        mapStringToEnum.put(UPPERLETTER.m_str.toUpperCase(), UPPERLETTER);
        LOWERLETTER = new UniTextGenNumType(5, "LOWERLETTER");
        mapIntToEnum.put(LOWERLETTER.value(), LOWERLETTER);
        mapStringToEnum.put(LOWERLETTER.m_str.toUpperCase(), LOWERLETTER);
        UPPERCYRLETTER = new UniTextGenNumType(6, "UPPERCYRLETTER");
        mapIntToEnum.put(UPPERCYRLETTER.value(), UPPERCYRLETTER);
        mapStringToEnum.put(UPPERCYRLETTER.m_str.toUpperCase(), UPPERCYRLETTER);
        LOWERCYRLETTER = new UniTextGenNumType(7, "LOWERCYRLETTER");
        mapIntToEnum.put(LOWERCYRLETTER.value(), LOWERCYRLETTER);
        mapStringToEnum.put(LOWERCYRLETTER.m_str.toUpperCase(), LOWERCYRLETTER);
        java.util.Collection<UniTextGenNumType> col = mapIntToEnum.values();
        m_Values = new UniTextGenNumType[col.size()];
        col.toArray(m_Values);
        m_Keys = new java.util.ArrayList<Integer>(mapIntToEnum.keySet());
    }
}
