Java Utililty Methods String to Int

List of utility methods to do String to Int

Description

The list of methods to do String to Int are organized into topic(s).

Method

IntegerconvertStringToInteger(String strParaConvert)
Converte uma String em Integer.
if (strParaConvert == null)
    return new Integer(0);
if (strParaConvert.trim().equalsIgnoreCase(""))
    return new Integer(0);
try {
    int aux = Integer.parseInt(strParaConvert);
    return new Integer(aux);
} catch (Exception e) {
...
IntegerconvertStringToInteger(String value)
convert the value to integer , it may throw a ParseException
return isNotEmpty(value) ? Integer.parseInt(value) : null;
intconvertStringToInteger(String value)
convert String To Integer
return convertStringToInteger(value, -1);
IntegerconvertStringToInteger(String value)
This method convert String to Integer if value is null then IllegalArgumentException is thrown.
Integer intValue = null;
if (value == null) {
    throw new IllegalArgumentException();
intValue = Integer.parseInt(value);
return intValue;