Parse a string with an option plus or minus followed by digits into an int. @param s a string that may or may not be a valid delta @return int @exception java.lang.NumberFormatException This exception is thrown if the string does not match the required format for a delta.
(String s)
| 57 | * required format for a delta. |
| 58 | */ |
| 59 | public static int parseInt(String s) |
| 60 | { |
| 61 | if (s.charAt(0) == '+') |
| 62 | { |
| 63 | s = s.substring(1); |
| 64 | } |
| 65 | |
| 66 | return Integer.parseInt(s); |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * toString |
no outgoing calls