List of utility methods to do String to Int
Integer | convertStringToInteger(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) { ... |
Integer | convertStringToInteger(String value) convert the value to integer , it may throw a ParseException return isNotEmpty(value) ? Integer.parseInt(value) : null;
|
int | convertStringToInteger(String value) convert String To Integer return convertStringToInteger(value, -1);
|
Integer | convertStringToInteger(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; |