Top Description Fields Constructors Methods
com.dlsc.gmapsfx.javascript

public Class JavascriptArray

extends JavascriptObject
Class Inheritance
Imports
java.util.HashMap, .Map, netscape.javascript.JSObject

JavascriptObject implementation of an array.

Return values are supplied as their raw return value from Javascript, unless that value has previously been passed in to the array as a JavascriptObject. The caller is then responsible for wrapping any new JSObjects in the appropriate JavascriptObject, as they should know what is needed.

Author
Geoff Capper

Field Summary

Modifier and TypeField and Description
private final Map<JSObject, JavascriptObject>
Inherited from com.dlsc.gmapsfx.javascript.JavascriptObject:
jsObjectobjectCounterpeerRegistryruntimevariableName

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
get(int idx)

public int
public int
public int
length()

Get the length of the array.

public Object
pop()

public int
push(Object obj)

public void
public Object
public void
sort(String func)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public int
Inherited from com.dlsc.gmapsfx.javascript.JavascriptObject:
checkBooleancheckIntegercheckUndefinedgetJSObjectgetNextVariableNamegetPropertygetPropertygetVariableNameinvokeJavascriptinvokeJavascriptinvokeJavascriptReturnValueinvokeJavascriptReturnValueisMemberDefinedsetPropertysetPropertysetProperty

Field Detail

contentback to summary
private final Map<JSObject, JavascriptObject> content

Constructor Detail

JavascriptArrayback to summary
public JavascriptArray()

Method Detail

getback to summary
public Object get(int idx)
indexOfback to summary
public int indexOf(Object obj)
lastIndexOfback to summary
public int lastIndexOf(Object obj)
lengthback to summary
public int length()

Get the length of the array. This returns the value from the underlying Javascrpt object.

popback to summary
public Object pop()
pushback to summary
public int push(Object obj)
reverseback to summary
public void reverse()
shiftback to summary
public Object shift()
sortback to summary
public void sort(String func)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
unshiftback to summary
public int unshift(Object obj)