package com.bonus.core.customer.constants;


import com.bonus.core.common.converter.LeExcelFieldConvertor;
import com.bonus.core.common.converter.LeExcelFieldEnum;

public enum PersonalSexEnum implements LeExcelFieldEnum<PersonalSexEnum> {
   MALE(1, "男"),
   FEMALE(2, "女"),
   UNKNOWN(3, "未知");

   private final Integer key;
   private final String desc;

   private PersonalSexEnum(Integer key, String desc) {
      this.key = key;
      this.desc = desc;
   }

   public static String getDesc(Integer key) {
      PersonalSexEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         PersonalSexEnum temp = var1[var3];
         if (temp.getKey().equals(key)) {
            return temp.getDesc();
         }
      }

      return "";
   }

   public static boolean isContains(Integer key) {
      PersonalSexEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         PersonalSexEnum temp = var1[var3];
         if (temp.getKey().equals(key)) {
            return true;
         }
      }

      return false;
   }

   @Override
   public Integer getKey() {
      return this.key;
   }

   @Override
   public String getDesc() {
      return this.desc;
   }

   // $FF: synthetic method
   private static PersonalSexEnum[] $values() {
      return new PersonalSexEnum[]{MALE, FEMALE, UNKNOWN};
   }

   public static class ExcelConvertor extends LeExcelFieldConvertor<PersonalSexEnum> {
      public ExcelConvertor() {
         super(PersonalSexEnum.class);
      }
   }
}
