| Constructor and Description |
|---|
PJsonArray(PElement parent,
org.json.JSONArray array,
java.lang.String contextName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(int i)
Get the object at the given index.
|
PArray |
getArray(int i)
Get the element at the index as a json array.
|
boolean |
getBool(int i)
Get the element as a boolean.
|
double |
getDouble(int i)
Get the element at the index as a double.
|
float |
getFloat(int i)
Get the element at the index as a float.
|
int |
getInt(int i)
Get the element at the index as an integer.
|
org.json.JSONArray |
getInternalArray()
Get access to underlying array.
|
PJsonArray |
getJSONArray(int i)
Get the element at the index as a json array.
|
PJsonObject |
getJSONObject(int i)
Get the element at the index as a json object.
|
long |
getLong(int i)
Get the element at the index as a long.
|
PObject |
getObject(int i)
Get the element at the index as a json object.
|
java.lang.String |
getString(int i)
Get the element at the index as a string.
|
int |
size()
Return the size of the array.
|
java.lang.String |
toString() |
addPathTo, getContextName, getCurrentPath, getParent, getPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCurrentPath, getPathpublic PJsonArray(PElement parent, org.json.JSONArray array, java.lang.String contextName)
parent - the parent object.array - the array to wrapcontextName - the name of this object within the parent.public final PObject getObject(int i)
public final PJsonObject getJSONObject(int i)
i - the index of the object to accesspublic final PArray getArray(int i)
public final PJsonArray getJSONArray(int i)
i - the index of the element to accesspublic final int getInt(int i)
public final long getLong(int i)
PArraypublic final float getFloat(int i)
public final double getDouble(int i)
public final java.lang.String getString(int i)
public final org.json.JSONArray getInternalArray()
public final boolean getBool(int i)
public final java.lang.Object get(int i)
PArraypublic final java.lang.String toString()
toString in class java.lang.Object