|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 | |
---|---|
boolean |
equals(java.lang.Object other)
Returns true if other is a JSONArray
wrapping the same underlying object. |
JSONValue |
get(int index)
Returns the value at the specified index position. |
JavaScriptObject |
getJavaScriptObject()
Returns the underlying JavaScript array that this object wraps. |
(package private) JavaScriptObject |
getUnwrapper()
Internal. |
int |
hashCode()
|
JSONArray |
isArray()
Returns this , as this is a JSONArray. |
JSONValue |
set(int index,
JSONValue value)
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, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSONArray()
public JSONArray(JavaScriptObject arr)
arr
- a JavaScript arrayMethod Detail |
---|
public boolean equals(java.lang.Object other)
true
if other
is a JSONArray
wrapping the same underlying object.
equals
in class java.lang.Object
public JSONValue get(int index)
index
- the index of the array item to retrieve
null
if this index is
emptypublic JavaScriptObject getJavaScriptObject()
public int hashCode()
hashCode
in class java.lang.Object
public JSONArray isArray()
this
, as this is a JSONArray.
isArray
in class JSONValue
null
otherwise.public JSONValue set(int index, JSONValue value)
index
- the index to setvalue
- the value to set
null
if this
index was emptypublic int size()
public java.lang.String toString()
toString
in class JSONValue
JavaScriptObject getUnwrapper()
JSONValue
getUnwrapper
in class JSONValue
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |