List of utility methods to do Integer Parse
int | tryParseInt(String value) try Parse Int try { return Integer.parseInt(value); } catch (Exception e) { return -1; |
Object | tryParseInteger(String intValue) try Parse Integer Object parsedValue; try { parsedValue = Integer.parseInt(intValue); } catch (NumberFormatException nfe) { parsedValue = intValue; return parsedValue; |
int | tryParseInteger(String text) try Parse Integer if ("".equals(text)) return -1; try { return Integer.parseInt(text); } catch (NumberFormatException e) { return -1; |
boolean | TryParseIntInvariant(String str, int[] n) Try Parse Int Invariant return TryParseInt(str, n);
|
int[] | tryParseInts(String[] in) Tries to parse an array of integers. try { return parseInts(in); } catch (NumberFormatException e) { return new int[0]; |