public static int toInt(@NotNull String value) throws InvalidDataException {
    int i;
    try {
      i = Integer.parseInt(value);
    }
    catch (NumberFormatException e) {
      throw new InvalidDataException(value, e);
    }
    return i;
  }
public static int toInt(@NotNull String value)