/**
   * Use this in place of valueOf.
   *
   * @param value real value
   * @return PlatformType corresponding to the value
   */
  public static PlatformType fromValue(String value) {
    if (value == null || "".equals(value)) {
      throw new IllegalArgumentException("Value cannot be null or empty!");
    }

    for (PlatformType enumEntry : PlatformType.values()) {
      if (enumEntry.toString().equals(value)) {
        return enumEntry;
      }
    }

    throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
  }