/*
 * 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
 */

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

class TextHelperComapreTextsResult {

    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 TextHelperComapreTextsResult) 
            return val;
        if(typeof val === 'string' || val instanceof String) {
            val = val.toUpperCase();
            if(TextHelperComapreTextsResult.mapStringToEnum.containsKey(val))
                return TextHelperComapreTextsResult.mapStringToEnum.get(val);
            return null;
        }
        if(TextHelperComapreTextsResult.mapIntToEnum.containsKey(val))
            return TextHelperComapreTextsResult.mapIntToEnum.get(val);
        let it = new TextHelperComapreTextsResult(val, val.toString());
        TextHelperComapreTextsResult.mapIntToEnum.put(val, it);
        TextHelperComapreTextsResult.mapStringToEnum.put(val.toString(), it);
        return it;
    }
    static isDefined(val) {
        return TextHelperComapreTextsResult.m_Keys.indexOf(val) >= 0;
    }
    static getValues() {
        return TextHelperComapreTextsResult.m_Values;
    }
    static static_constructor() {
        TextHelperComapreTextsResult.mapIntToEnum = new Hashtable();
        TextHelperComapreTextsResult.mapStringToEnum = new Hashtable();
        TextHelperComapreTextsResult.NOTEQUAL = new TextHelperComapreTextsResult(0, "NOTEQUAL");
        TextHelperComapreTextsResult.mapIntToEnum.put(TextHelperComapreTextsResult.NOTEQUAL.value(), TextHelperComapreTextsResult.NOTEQUAL); 
        TextHelperComapreTextsResult.mapStringToEnum.put(TextHelperComapreTextsResult.NOTEQUAL.m_str.toUpperCase(), TextHelperComapreTextsResult.NOTEQUAL); 
        TextHelperComapreTextsResult.FIRSTSTARTSWITHSECOND = new TextHelperComapreTextsResult(1, "FIRSTSTARTSWITHSECOND");
        TextHelperComapreTextsResult.mapIntToEnum.put(TextHelperComapreTextsResult.FIRSTSTARTSWITHSECOND.value(), TextHelperComapreTextsResult.FIRSTSTARTSWITHSECOND); 
        TextHelperComapreTextsResult.mapStringToEnum.put(TextHelperComapreTextsResult.FIRSTSTARTSWITHSECOND.m_str.toUpperCase(), TextHelperComapreTextsResult.FIRSTSTARTSWITHSECOND); 
        TextHelperComapreTextsResult.SECONDSTARTSWITHFIRST = new TextHelperComapreTextsResult(2, "SECONDSTARTSWITHFIRST");
        TextHelperComapreTextsResult.mapIntToEnum.put(TextHelperComapreTextsResult.SECONDSTARTSWITHFIRST.value(), TextHelperComapreTextsResult.SECONDSTARTSWITHFIRST); 
        TextHelperComapreTextsResult.mapStringToEnum.put(TextHelperComapreTextsResult.SECONDSTARTSWITHFIRST.m_str.toUpperCase(), TextHelperComapreTextsResult.SECONDSTARTSWITHFIRST); 
        TextHelperComapreTextsResult.EQUALS = new TextHelperComapreTextsResult(3, "EQUALS");
        TextHelperComapreTextsResult.mapIntToEnum.put(TextHelperComapreTextsResult.EQUALS.value(), TextHelperComapreTextsResult.EQUALS); 
        TextHelperComapreTextsResult.mapStringToEnum.put(TextHelperComapreTextsResult.EQUALS.m_str.toUpperCase(), TextHelperComapreTextsResult.EQUALS); 
        TextHelperComapreTextsResult.m_Values = Array.from(TextHelperComapreTextsResult.mapIntToEnum.values);
        TextHelperComapreTextsResult.m_Keys = Array.from(TextHelperComapreTextsResult.mapIntToEnum.keys);
    }
}


TextHelperComapreTextsResult.static_constructor();

module.exports = TextHelperComapreTextsResult