/*
 * 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.zip;

// Defines known values for the <see cref="HostSystemID"/> property.
public class HostSystemID implements Comparable<HostSystemID> {

    public static final HostSystemID MSDOS; // 0

    public static final HostSystemID AMIGA; // 1

    public static final HostSystemID OPENVMS; // 2

    public static final HostSystemID UNIX; // 3

    public static final HostSystemID VMCMS; // 4

    public static final HostSystemID ATARIST; // 5

    public static final HostSystemID OS2; // 6

    public static final HostSystemID MACINTOSH; // 7

    public static final HostSystemID ZSYSTEM; // 8

    public static final HostSystemID CPM; // 9

    public static final HostSystemID WINDOWSNT; // 10

    public static final HostSystemID MVS; // 11

    public static final HostSystemID VSE; // 12

    public static final HostSystemID ACORNRISC; // 13

    public static final HostSystemID VFAT; // 14

    public static final HostSystemID ALTERNATEMVS; // 15

    public static final HostSystemID BEOS; // 16

    public static final HostSystemID TANDEM; // 17

    public static final HostSystemID OS400; // 18

    public static final HostSystemID OSX; // 19

    public static final HostSystemID WINZIPAES; // 99


    public int value() { return m_val; }
    private int m_val;
    private String m_str;
    private HostSystemID(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(HostSystemID 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, HostSystemID> mapIntToEnum; 
    private static java.util.HashMap<String, HostSystemID> mapStringToEnum; 
    private static HostSystemID[] m_Values; 
    private static java.util.Collection<Integer> m_Keys; 
    public static HostSystemID of(int val) {
        if (mapIntToEnum.containsKey(val)) return mapIntToEnum.get(val);
        HostSystemID item = new HostSystemID(val, ((Integer)val).toString());
        mapIntToEnum.put(val, item);
        mapStringToEnum.put(item.m_str.toUpperCase(), item);
        return item; 
    }
    public static HostSystemID 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 HostSystemID[] getValues() {
        return m_Values; 
    }
    static {
        mapIntToEnum = new java.util.HashMap<Integer, HostSystemID>();
        mapStringToEnum = new java.util.HashMap<String, HostSystemID>();
        MSDOS = new HostSystemID(0, "MSDOS");
        mapIntToEnum.put(MSDOS.value(), MSDOS);
        mapStringToEnum.put(MSDOS.m_str.toUpperCase(), MSDOS);
        AMIGA = new HostSystemID(1, "AMIGA");
        mapIntToEnum.put(AMIGA.value(), AMIGA);
        mapStringToEnum.put(AMIGA.m_str.toUpperCase(), AMIGA);
        OPENVMS = new HostSystemID(2, "OPENVMS");
        mapIntToEnum.put(OPENVMS.value(), OPENVMS);
        mapStringToEnum.put(OPENVMS.m_str.toUpperCase(), OPENVMS);
        UNIX = new HostSystemID(3, "UNIX");
        mapIntToEnum.put(UNIX.value(), UNIX);
        mapStringToEnum.put(UNIX.m_str.toUpperCase(), UNIX);
        VMCMS = new HostSystemID(4, "VMCMS");
        mapIntToEnum.put(VMCMS.value(), VMCMS);
        mapStringToEnum.put(VMCMS.m_str.toUpperCase(), VMCMS);
        ATARIST = new HostSystemID(5, "ATARIST");
        mapIntToEnum.put(ATARIST.value(), ATARIST);
        mapStringToEnum.put(ATARIST.m_str.toUpperCase(), ATARIST);
        OS2 = new HostSystemID(6, "OS2");
        mapIntToEnum.put(OS2.value(), OS2);
        mapStringToEnum.put(OS2.m_str.toUpperCase(), OS2);
        MACINTOSH = new HostSystemID(7, "MACINTOSH");
        mapIntToEnum.put(MACINTOSH.value(), MACINTOSH);
        mapStringToEnum.put(MACINTOSH.m_str.toUpperCase(), MACINTOSH);
        ZSYSTEM = new HostSystemID(8, "ZSYSTEM");
        mapIntToEnum.put(ZSYSTEM.value(), ZSYSTEM);
        mapStringToEnum.put(ZSYSTEM.m_str.toUpperCase(), ZSYSTEM);
        CPM = new HostSystemID(9, "CPM");
        mapIntToEnum.put(CPM.value(), CPM);
        mapStringToEnum.put(CPM.m_str.toUpperCase(), CPM);
        WINDOWSNT = new HostSystemID(10, "WINDOWSNT");
        mapIntToEnum.put(WINDOWSNT.value(), WINDOWSNT);
        mapStringToEnum.put(WINDOWSNT.m_str.toUpperCase(), WINDOWSNT);
        MVS = new HostSystemID(11, "MVS");
        mapIntToEnum.put(MVS.value(), MVS);
        mapStringToEnum.put(MVS.m_str.toUpperCase(), MVS);
        VSE = new HostSystemID(12, "VSE");
        mapIntToEnum.put(VSE.value(), VSE);
        mapStringToEnum.put(VSE.m_str.toUpperCase(), VSE);
        ACORNRISC = new HostSystemID(13, "ACORNRISC");
        mapIntToEnum.put(ACORNRISC.value(), ACORNRISC);
        mapStringToEnum.put(ACORNRISC.m_str.toUpperCase(), ACORNRISC);
        VFAT = new HostSystemID(14, "VFAT");
        mapIntToEnum.put(VFAT.value(), VFAT);
        mapStringToEnum.put(VFAT.m_str.toUpperCase(), VFAT);
        ALTERNATEMVS = new HostSystemID(15, "ALTERNATEMVS");
        mapIntToEnum.put(ALTERNATEMVS.value(), ALTERNATEMVS);
        mapStringToEnum.put(ALTERNATEMVS.m_str.toUpperCase(), ALTERNATEMVS);
        BEOS = new HostSystemID(16, "BEOS");
        mapIntToEnum.put(BEOS.value(), BEOS);
        mapStringToEnum.put(BEOS.m_str.toUpperCase(), BEOS);
        TANDEM = new HostSystemID(17, "TANDEM");
        mapIntToEnum.put(TANDEM.value(), TANDEM);
        mapStringToEnum.put(TANDEM.m_str.toUpperCase(), TANDEM);
        OS400 = new HostSystemID(18, "OS400");
        mapIntToEnum.put(OS400.value(), OS400);
        mapStringToEnum.put(OS400.m_str.toUpperCase(), OS400);
        OSX = new HostSystemID(19, "OSX");
        mapIntToEnum.put(OSX.value(), OSX);
        mapStringToEnum.put(OSX.m_str.toUpperCase(), OSX);
        WINZIPAES = new HostSystemID(99, "WINZIPAES");
        mapIntToEnum.put(WINZIPAES.value(), WINZIPAES);
        mapStringToEnum.put(WINZIPAES.m_str.toUpperCase(), WINZIPAES);
        java.util.Collection<HostSystemID> col = mapIntToEnum.values();
        m_Values = new HostSystemID[col.size()];
        col.toArray(m_Values);
        m_Keys = new java.util.ArrayList<Integer>(mapIntToEnum.keySet());
    }
}
