(String s)
| 109 | } |
| 110 | |
| 111 | private int |
| 112 | parseNumeric(String s) { |
| 113 | try { |
| 114 | int val = Integer.parseInt(s); |
| 115 | if (val >= 0 && val <= max) |
| 116 | return val; |
| 117 | } |
| 118 | catch (NumberFormatException e) { |
| 119 | } |
| 120 | return -1; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Defines the text representation of a numeric value. |