示例#1
0
 public static Integer intValue(String value) {
   for (BioSafetyOption option : BioSafetyOption.values()) {
     if (option.displayName.equalsIgnoreCase(value) || option.getValue().equals(value)) {
       return Integer.valueOf(option.getValue());
     }
   }
   return null;
 }
示例#2
0
  public static boolean isValidOption(Integer integer) {
    if (integer == null) return false;

    for (BioSafetyOption option : BioSafetyOption.values()) {
      Integer intValue = intValue(option.toString());
      if (intValue != null && integer.intValue() == intValue) return true;
    }
    return false;
  }