Package com.google.gwt.json.client
Class JSONArray
java.lang.Object
com.google.gwt.json.client.JSONValue
com.google.gwt.json.client.JSONArray
Represents an array of 
JSONValue objects.- 
Constructor SummaryConstructorsConstructorDescriptionCreates an empty JSONArray.Creates a new JSONArray from the supplied JavaScriptObject representing a JavaScript array.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanget(int index) Returns the value at the specified index position.Returns the underlying JavaScript array that this object wraps.(package private) JavaScriptObjectInternal.inthashCode()isArray()Returnsthis, as this is a JSONArray.Sets the specified index to the given value.intsize()Returns the number of elements in this array.toString()Create the JSON encoded string representation of this JSONArray instance.
- 
Constructor Details- 
JSONArraypublic JSONArray()Creates an empty JSONArray.
- 
JSONArrayCreates a new JSONArray from the supplied JavaScriptObject representing a JavaScript array.- Parameters:
- arr- a JavaScript array
 
 
- 
- 
Method Details- 
equals
- 
getReturns the value at the specified index position.- Parameters:
- index- the index of the array item to retrieve
- Returns:
- the value at this index, or nullif this index is empty
 
- 
getJavaScriptObjectReturns the underlying JavaScript array that this object wraps.
- 
hashCodepublic int hashCode()
- 
isArrayReturnsthis, as this is a JSONArray.
- 
setSets the specified index to the given value.- Parameters:
- index- the index to set
- value- the value to set
- Returns:
- the previous value at this index, or nullif this index was empty
 
- 
sizepublic int size()Returns the number of elements in this array.- Returns:
- size of this array
 
- 
toStringCreate the JSON encoded string representation of this JSONArray instance. This method may take a long time to execute if the underlying array is large.
- 
getUnwrapperJavaScriptObject getUnwrapper()Description copied from class:JSONValueInternal. Returns a JS func that can unwrap this value. Used from native code.- Specified by:
- getUnwrapperin class- JSONValue
 
 
-