|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.json.client.JSONValue
com.google.gwt.json.client.JSONArray
public class JSONArray
Represents an array of JSONValue
objects.
Constructor Summary | |
---|---|
JSONArray()
Creates an empty JSONArray. |
|
JSONArray(JavaScriptObject arr)
Creates a new JSONArray from the supplied JavaScriptObject representing a JavaScript array. |
Method Summary | |
---|---|
JSONValue |
get(int index)
Returns the value at the specified index position. |
JSONArray |
isArray()
Returns this , as this is a JSONArray. |
JSONValue |
set(int index,
JSONValue jsonValue)
Sets the specified index to the given value. |
int |
size()
Returns the number of elements in this array. |
java.lang.String |
toString()
Create the JSON encoded string representation of this JSONArray instance. |
Methods inherited from class com.google.gwt.json.client.JSONValue |
---|
isBoolean, isNull, isNumber, isObject, isString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSONArray()
public JSONArray(JavaScriptObject arr)
arr
- a JavaScript arrayMethod Detail |
---|
public JSONValue get(int index) throws JSONException
index
- the index of the array item to retrieve
null
if this index is
empty
JSONException
public JSONArray isArray()
this
, as this is a JSONArray.
isArray
in class JSONValue
null
otherwise.public JSONValue set(int index, JSONValue jsonValue)
index
- the index to setjsonValue
- the value to set
null
if this
index was emptypublic int size()
public java.lang.String toString() throws JSONException
toString
in class JSONValue
JSONException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |