Get the object value associated with an index. @param index must be between 0 and length() - 1 @return An object value. @throws RuntimeException If there is no value for the index.
(int index)
| 264 | * @throws RuntimeException If there is no value for the index. |
| 265 | */ |
| 266 | public Object get(int index) { |
| 267 | Object object = opt(index); |
| 268 | if (object == null) { |
| 269 | throw new RuntimeException("JSONArray[" + index + "] not found."); |
| 270 | } |
| 271 | return object; |
| 272 | } |
| 273 | |
| 274 | |
| 275 | /** |
no test coverage detected