code: public static Status valueOf(String name) {
      if (name == null) {
        return UNDEFINED;
      }
      for (Status status : INSTANCES.values()) {
        if (name.equals(status.getName())) {
          return status;
        }
      }
      return UNDEFINED;
    }
docs: Converts a <code>String</code> name to a status.
  @param name the name of the status
  @return the status or <code>UNDEFINDED</code> if the conversion fails.