package com.bonus.canteen.core.device.constants;

public enum MacCounterActivateEnum {
   ENABLED(1, "启用"),
   DISABLED(2, "禁用"),
   FAULT(3, "故障");

   private final Integer key;
   private final String value;

   private MacCounterActivateEnum(Integer key, String value) {
      this.key = key;
      this.value = value;
   }

   public static Integer getKey(String value) {
      MacCounterActivateEnum[] macCounterActivateEnums = values();
      MacCounterActivateEnum[] var2 = macCounterActivateEnums;
      int var3 = macCounterActivateEnums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         MacCounterActivateEnum macCounterActivateEnum = var2[var4];
         if (macCounterActivateEnum.value().equals(value)) {
            return macCounterActivateEnum.key();
         }
      }

      return null;
   }

   public static String getValue(Integer key) {
      MacCounterActivateEnum[] macCounterActivateEnums = values();
      MacCounterActivateEnum[] var2 = macCounterActivateEnums;
      int var3 = macCounterActivateEnums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         MacCounterActivateEnum macCounterActivateEnum = var2[var4];
         if (macCounterActivateEnum.key().equals(key)) {
            return macCounterActivateEnum.value();
         }
      }

      return null;
   }

   public Integer key() {
      return this.key;
   }

   public String value() {
      return this.value;
   }

}
