int (@NotNull String name, @NotNull Map<String, String> options) { try { String option = options.get(name); return option != null ? Integer.parseInt(option) : -1; } catch (NumberFormatException e) { // ignore } return -1; }