Returns the value at index. @throws JSONException if this array has no value at index, or if that value is the null reference. This method returns normally if the value is JSONObject#NULL.
(int index)
| 273 | * normally if the value is {@code JSONObject#NULL}. |
| 274 | */ |
| 275 | public Object get(int index) throws JSONException { |
| 276 | try { |
| 277 | Object value = values.get(index); |
| 278 | if (value == null) { |
| 279 | throw new JSONException("Value at " + index + " is null."); |
| 280 | } |
| 281 | return value; |
| 282 | } catch (IndexOutOfBoundsException e) { |
| 283 | throw new JSONException("Index " + index + " out of range [0.." + values.size() + ")"); |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | /** |
| 288 | * Returns the value at {@code index}, or null if the array has no value |
no outgoing calls
no test coverage detected