public class JsArrayNumber extends JavaScriptObject
native JsArrayNumber getNativeArray() /*-{
return [1.1, 2.2, 3.3];
}-* /;
| Modifier | Constructor and Description |
|---|---|
protected |
JsArrayNumber() |
| Modifier and Type | Method and Description |
|---|---|
double |
get(int index)
Gets the value at a given index.
|
java.lang.String |
join()
Convert each element of the array to a String and join them with a comma
separator.
|
java.lang.String |
join(java.lang.String separator)
Convert each element of the array to a String and join them with a comma
separator.
|
int |
length()
Gets the length of the array.
|
void |
push(double value)
Pushes the given number onto the end of the array.
|
void |
set(int index,
double value)
Sets the value value at a given index.
|
void |
setLength(int newLength)
Reset the length of the array.
|
double |
shift()
Shifts the first value off the array.
|
void |
unshift(double value)
Shifts a value onto the beginning of the array.
|
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toStringpublic final double get(int index)
index - the index to be retrievedpublic final java.lang.String join()
public final java.lang.String join(java.lang.String separator)
public final int length()
public final void push(double value)
public final void set(int index,
double value)
index - the index to be setvalue - the value to be storedpublic final void setLength(int newLength)
newLength - the new length of the arraypublic final double shift()
public final void unshift(double value)
value - the value to the stored