package com.bonus.canteen.core.nutrition.constant;

public enum YesOrNoEnum {
   YES(1, "是"),
   NO(2, "否");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

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

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

      return null;
   }

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

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

}
