Returns the value at index if it exists and is an int or can be coerced to an int. @throws JSONException if the value at index doesn't exist or cannot be coerced to a int.
(int index)
| 382 | * cannot be coerced to a int. |
| 383 | */ |
| 384 | public int getInt(int index) throws JSONException { |
| 385 | Object object = get(index); |
| 386 | Integer result = JSON.toInteger(object); |
| 387 | if (result == null) { |
| 388 | throw JSON.typeMismatch(index, object, "int"); |
| 389 | } |
| 390 | return result; |
| 391 | } |
| 392 | |
| 393 | /** |
| 394 | * Returns the value at {@code index} if it exists and is an int or |
nothing calls this directly
no test coverage detected