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

    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 ZipFileHeaderTest) 
            return val;
        if(typeof val === 'string' || val instanceof String) {
            val = val.toUpperCase();
            if(ZipFileHeaderTest.mapStringToEnum.containsKey(val))
                return ZipFileHeaderTest.mapStringToEnum.get(val);
            return null;
        }
        if(ZipFileHeaderTest.mapIntToEnum.containsKey(val))
            return ZipFileHeaderTest.mapIntToEnum.get(val);
        let it = new ZipFileHeaderTest(val, val.toString());
        ZipFileHeaderTest.mapIntToEnum.put(val, it);
        ZipFileHeaderTest.mapStringToEnum.put(val.toString(), it);
        return it;
    }
    static isDefined(val) {
        return ZipFileHeaderTest.m_Keys.indexOf(val) >= 0;
    }
    static getValues() {
        return ZipFileHeaderTest.m_Values;
    }
    static static_constructor() {
        ZipFileHeaderTest.mapIntToEnum = new Hashtable();
        ZipFileHeaderTest.mapStringToEnum = new Hashtable();
        ZipFileHeaderTest.EXTRACT = new ZipFileHeaderTest(0x01, "EXTRACT");
        ZipFileHeaderTest.mapIntToEnum.put(ZipFileHeaderTest.EXTRACT.value(), ZipFileHeaderTest.EXTRACT); 
        ZipFileHeaderTest.mapStringToEnum.put(ZipFileHeaderTest.EXTRACT.m_str.toUpperCase(), ZipFileHeaderTest.EXTRACT); 
        ZipFileHeaderTest.HEADER = new ZipFileHeaderTest(0x02, "HEADER");
        ZipFileHeaderTest.mapIntToEnum.put(ZipFileHeaderTest.HEADER.value(), ZipFileHeaderTest.HEADER); 
        ZipFileHeaderTest.mapStringToEnum.put(ZipFileHeaderTest.HEADER.m_str.toUpperCase(), ZipFileHeaderTest.HEADER); 
        ZipFileHeaderTest.m_Values = Array.from(ZipFileHeaderTest.mapIntToEnum.values);
        ZipFileHeaderTest.m_Keys = Array.from(ZipFileHeaderTest.mapIntToEnum.keys);
    }
}


ZipFileHeaderTest.static_constructor();

module.exports = ZipFileHeaderTest