Retrieves the JSONArray with the associated index value. @webref jsonobject:method @webBrief Retrieves the JSONArray with the associated index value @param index must be between 0 and length() - 1 @return A JSONArray value. @throws RuntimeException If there is no value for the index.
(int index)
| 513 | * @see JSONArray#setJSONArray(int, JSONArray) |
| 514 | */ |
| 515 | public JSONArray getJSONArray(int index) { |
| 516 | Object object = this.get(index); |
| 517 | if (object instanceof JSONArray) { |
| 518 | return (JSONArray)object; |
| 519 | } |
| 520 | throw new RuntimeException("JSONArray[" + index + "] is not a JSONArray."); |
| 521 | } |
| 522 | |
| 523 | |
| 524 | public JSONArray getJSONArray(int index, JSONArray defaultValue) { |