Gets an int from the System.in
@param title  for the command line
@param defaultValue defaultValue if title not found
@return int as entered by the user of the console app
343921
public static int getInt(final String title, final int defaultValue) {
        int opt;

        do {
            try {
                final String val = ConsoleMenu.getString(title + DEFAULT_TITLE + defaultValue + ")");
                if (val.length() == 0) {
                    opt = defaultValue;
                } else {
                    opt = Integer.parseInt(val);
                }
            } catch (final NumberFormatException e) {
                opt = -1;
            }
        } while (opt == -1);

        return opt;
    }
1357225
public static BigDecimal getBigDecimal(final String title, final BigDecimal defaultValue) {
        BigDecimal opt;

        do {
            try {
                final String val = ConsoleMenu.getString(title + DEFAULT_TITLE + defaultValue + ")");
                if (val.length() == 0) {
                    opt = defaultValue;
                } else {
                    opt = new BigDecimal(val);
                }
            } catch (final NumberFormatException e) {
                opt = null;
            }
        } while (opt == null && defaultValue != null);

        return opt;
    }
1008315
public function getInt(string $key, int $default = null) : int
    {
        return (int) $this->get($key, $default);
    }
1225160
public Integer getCookieToInt(String name, Integer defaultValue) {
		String result = getCookie(name);
		return result != null ? Integer.parseInt(result) : defaultValue;
	}
84289
private int getInt(XMLProperty p, int defaultValue) {
		final String value = get(p);
		if (value.isEmpty()) {
			return defaultValue;
		}
		return Integer.parseInt(value);
	}
267923
public static int getIntArg(CommandLine cl, Option option, int defaultValue) {
    int arg = defaultValue;
    if (cl.hasOption(option.getLongOpt())) {
      String argOption = cl.getOptionValue(option.getLongOpt());
      arg = Integer.parseInt(argOption);
    }
    return arg;
  }
18512
public static int toInteger(Object value, int defaultValue) {
		if (value == null || value.toString().trim().equals("")) {
			return defaultValue;
		}
		if (value instanceof Integer) {
			return (Integer) value;
		}
		return (int) JKConversionUtil.toDouble(value);
	}
1253756
public int getInt(String key, int default_) {
    Object o = get(key);
    return o instanceof Number ? ((Number) o).intValue() : default_;
  }
442463
public static String getProperty(String propertyName, String defaultValue) {
        String value = get(propertyName);
        return value == null ? defaultValue : value;
    }
811508
public int getAsInt(final String name, final int defaultValue) {
        return AtsdUtil.getPropertyIntValue(fullName(name), clientProperties, defaultValue);
    }
1142376
public static boolean getBoolean(final String title, final boolean defaultValue) {
        final String val = ConsoleMenu.selectOne(title, new String[] { "Yes", "No" },
                new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() }, defaultValue ? 1 : 2);

        return Boolean.valueOf(val);
    }
457856
public static int getInt(String name, int defaultVal){
        if(getConfiguration().containsKey(name)){
            return getConfiguration().getInt(name);
        } else {
            return defaultVal;
        }
    }
1223797
public Integer getInteger(Class<?> aClass, String key, int defaultValue)
   {
	   return getInteger(aClass.getName()+".key",defaultValue);
   }
895669
public int intValue() {
		int value;
		value = Integer.parseInt(this.param);
		if(this.isNeg) value = (-value);
		return value;
	}
625040
public static int getInt(JsonObject object, String field, int defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null || value.isNull()) {
            return defaultValue;
        } else {
            return value.asInt();
        }
    }
1114626
public static int getSystemPropertyAsInteger(String name, int defaultValue) {
        final String value = getSystemProperty(name, null);
        if (value != null) {
            try {
                return Integer.parseInt(value);
            } catch (Throwable exception) {
                //
            }
        }
        return defaultValue;
    }
510665
private int convertInt(String input, int defaultValue) {
        try {
            return Integer.parseInt(input.trim());
        } catch (NumberFormatException nfe) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Malformed input: " + input);
            }
            return defaultValue;
        }
    }