package com.bonus.core.allocation.advise.constants;

public enum AllocFunctionTypeEnum {
   FIRST_EDITION(1, "初版"),
   CUSTOM(2, "自定义");

   private final Integer key;
   private final String value;

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

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

      for(int var4 = 0; var4 < var3; ++var4) {
         AllocFunctionTypeEnum temp = var2[var4];
         if (temp.getValue().equals(value)) {
            return temp.getKey();
         }
      }

      return null;
   }

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

      for(int var4 = 0; var4 < var3; ++var4) {
         AllocFunctionTypeEnum temp = var2[var4];
         if (temp.getKey().equals(key)) {
            return temp.getValue();
         }
      }

      return null;
   }

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

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

}
