Ejemplo n.º 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;
 }
Ejemplo n.º 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;
  }