(String name)
| 156 | } |
| 157 | |
| 158 | private static int getKeyCode(String name) { |
| 159 | for (int i = 0; i < COUNT_KEY_NAMES; i++) |
| 160 | if (name.equals(someNames[i])) |
| 161 | return someCodes[i]; |
| 162 | |
| 163 | if (name.length() == 1) { |
| 164 | char ch = name.charAt(0); |
| 165 | if (((ch > 64) && (ch < 91)) // [A-Z] |
| 166 | || ((ch > 96) && (ch < 123))) // [a-z] |
| 167 | return (int) ch; |
| 168 | } |
| 169 | |
| 170 | return Integer.parseInt(name); |
| 171 | } |
| 172 | |
| 173 | private static boolean withModificator(String name) { |
| 174 | if ((name.length() > 1) && (name.charAt(0) == 'M')) |
no test coverage detected