/*
 * SDK Pullenti Lingvo, 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#.NET project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const Hashtable = require("./../../unisharp/Hashtable");

/**
 * Результат сравнения номеров
 */
class ComplexNumCompareType {

    constructor(val, str) {
        this.m_val = val;
        this.m_str = str;
    }
    toString() {
        return this.m_str;
    }
    value() {
        return this.m_val;
    }
    static of(val) {
        if(val instanceof ComplexNumCompareType) 
            return val;
        if(typeof val === 'string' || val instanceof String) {
            val = val.toUpperCase();
            if(ComplexNumCompareType.mapStringToEnum.containsKey(val))
                return ComplexNumCompareType.mapStringToEnum.get(val);
            return null;
        }
        if(ComplexNumCompareType.mapIntToEnum.containsKey(val))
            return ComplexNumCompareType.mapIntToEnum.get(val);
        let it = new ComplexNumCompareType(val, val.toString());
        ComplexNumCompareType.mapIntToEnum.put(val, it);
        ComplexNumCompareType.mapStringToEnum.put(val.toString(), it);
        return it;
    }
    static isDefined(val) {
        return ComplexNumCompareType.m_Keys.indexOf(val) >= 0;
    }
    static getValues() {
        return ComplexNumCompareType.m_Values;
    }
    static static_constructor() {
        ComplexNumCompareType.mapIntToEnum = new Hashtable();
        ComplexNumCompareType.mapStringToEnum = new Hashtable();
        ComplexNumCompareType.UNCOMPARABLE = new ComplexNumCompareType(0, "UNCOMPARABLE");
        ComplexNumCompareType.mapIntToEnum.put(ComplexNumCompareType.UNCOMPARABLE.value(), ComplexNumCompareType.UNCOMPARABLE); 
        ComplexNumCompareType.mapStringToEnum.put(ComplexNumCompareType.UNCOMPARABLE.m_str.toUpperCase(), ComplexNumCompareType.UNCOMPARABLE); 
        ComplexNumCompareType.EQUALS = new ComplexNumCompareType(1, "EQUALS");
        ComplexNumCompareType.mapIntToEnum.put(ComplexNumCompareType.EQUALS.value(), ComplexNumCompareType.EQUALS); 
        ComplexNumCompareType.mapStringToEnum.put(ComplexNumCompareType.EQUALS.m_str.toUpperCase(), ComplexNumCompareType.EQUALS); 
        ComplexNumCompareType.LESS = new ComplexNumCompareType(2, "LESS");
        ComplexNumCompareType.mapIntToEnum.put(ComplexNumCompareType.LESS.value(), ComplexNumCompareType.LESS); 
        ComplexNumCompareType.mapStringToEnum.put(ComplexNumCompareType.LESS.m_str.toUpperCase(), ComplexNumCompareType.LESS); 
        ComplexNumCompareType.GREAT = new ComplexNumCompareType(3, "GREAT");
        ComplexNumCompareType.mapIntToEnum.put(ComplexNumCompareType.GREAT.value(), ComplexNumCompareType.GREAT); 
        ComplexNumCompareType.mapStringToEnum.put(ComplexNumCompareType.GREAT.m_str.toUpperCase(), ComplexNumCompareType.GREAT); 
        ComplexNumCompareType.COMPARABLE = new ComplexNumCompareType(4, "COMPARABLE");
        ComplexNumCompareType.mapIntToEnum.put(ComplexNumCompareType.COMPARABLE.value(), ComplexNumCompareType.COMPARABLE); 
        ComplexNumCompareType.mapStringToEnum.put(ComplexNumCompareType.COMPARABLE.m_str.toUpperCase(), ComplexNumCompareType.COMPARABLE); 
        ComplexNumCompareType.m_Values = Array.from(ComplexNumCompareType.mapIntToEnum.values);
        ComplexNumCompareType.m_Keys = Array.from(ComplexNumCompareType.mapIntToEnum.keys);
    }
}


ComplexNumCompareType.static_constructor();

module.exports = ComplexNumCompareType