package com.inspect.metadata.montdata.montenum;

public enum MicroMeteInfoEnum {
    EvnTmp("1", "环境温度"),
    EvnHum("2", "环境湿度"),
    WdSpd("3", "风速"),
    RnFll("4", "雨量"),
    WdDir("5", "风向"),
    AirPre("6", "气压"),
    Oxygen("7", "氧气"),
    SF6("8", "硫氧化硫");

    private String typeCode;
    private String targetValue;

    private MicroMeteInfoEnum(String typeCode, String targetValue) {
        this.typeCode = typeCode;
        this.targetValue = targetValue;
    }

    public static String getTargetValueByTypeCode(String typeCode) {
        MicroMeteInfoEnum[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            MicroMeteInfoEnum c = var1[var3];
            if (c.typeCode.equals(typeCode)) {
                return c.getTargetValue();
            }
        }

        return null;
    }

    public static String getNameByTypeCode(String typeCode) {
        MicroMeteInfoEnum[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            MicroMeteInfoEnum c = var1[var3];
            if (c.typeCode.equals(typeCode)) {
                return c.name();
            }
        }

        return null;
    }

    public static MicroMeteInfoEnum getEnumObjectByTypeCode(String typeCode) {
        MicroMeteInfoEnum[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            MicroMeteInfoEnum c = var1[var3];
            if (c.typeCode.equals(typeCode)) {
                return c;
            }
        }

        return null;
    }

    public String getTypeCode() {
        return this.typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTargetValue() {
        return this.targetValue;
    }

    public void setTargetValue(String targetValue) {
        this.targetValue = targetValue;
    }

    public static void main(String[] args) {
        String a = getNameByTypeCode("1");
        System.out.println(a);
        MicroMeteInfoEnum enumM = getEnumObjectByTypeCode("2");
        System.out.println(enumM.name());
        System.out.println(enumM.getTargetValue());
    }
}
