public class ImmutableJSONArray extends ListBasedJSONArray
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableJSONArray.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected static ImmutableJSONArray |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
<A extends JSONArray,O extends JSONObject> |
clone(JSONBuilder<A,O> builder) |
ImmutableJSONArray |
getJSONArray(int index)
Get the JSONArray associated with an index.
|
ImmutableJSONObject |
getJSONObject(int index)
Get the JSONObject associated with an index.
|
ImmutableJSONArray |
optJSONArray(int index)
Get the optional JSONArray associated with an index.
|
ImmutableJSONObject |
optJSONObject(int index)
Get the optional JSONObject associated with an index.
|
equals, equalsList, get, getBackingList, getBoolean, getDouble, getInt, getLong, getString, hashCode, indexOf, isNull, iterator, length, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optLong, optLong, optString, optString, put, put, put, put, put, put, put, put, put, put, remove, remove, toString, toString, toString, writeprotected static final ImmutableJSONArray EMPTY
public <A extends JSONArray,O extends JSONObject> A clone(JSONBuilder<A,O> builder) throws JSONException
clone in interface JSONArrayclone in class ListBasedJSONArrayJSONExceptionpublic ImmutableJSONArray getJSONArray(int index) throws JSONException
ListBasedJSONArraygetJSONArray in interface JSONArraygetJSONArray in class ListBasedJSONArrayindex - The index must be between 0 and length() - 1.JSONException - If there is no value for the index. or if the value is not a JSONArraypublic ImmutableJSONObject getJSONObject(int index) throws JSONException
ListBasedJSONArraygetJSONObject in interface JSONArraygetJSONObject in class ListBasedJSONArrayindex - subscriptJSONException - If there is no value for the index or if the value is not a JSONObjectpublic ImmutableJSONArray optJSONArray(int index)
ListBasedJSONArrayoptJSONArray in interface JSONArrayoptJSONArray in class ListBasedJSONArrayindex - subscriptpublic ImmutableJSONObject optJSONObject(int index)
ListBasedJSONArrayoptJSONObject in interface JSONArrayoptJSONObject in class ListBasedJSONArrayindex - The index must be between 0 and length() - 1.