public class JsLightArrayInteger extends Object implements LightArrayInt
LightArrayInt
that uses native javascript arraysConstructor and Description |
---|
JsLightArrayInteger()
Construct a
JsLightArrayInteger |
JsLightArrayInteger(com.google.gwt.core.client.JavaScriptObject array)
Construct a
JsLightArrayInteger with a given javascript array |
Modifier and Type | Method and Description |
---|---|
int |
get(int index)
get the object at a specific index
|
com.google.gwt.core.client.JavaScriptObject |
getArray()
get the underlying javascript array
|
int |
length()
the length of the array
|
void |
push(int value)
push a value on to the array
|
void |
set(int index,
int value)
put an object to a given index. the array autoexpands and fills up missing values with null
|
int |
shift()
pop a value from the array
|
void |
unshift(int value)
push a value onto the array
|
public JsLightArrayInteger()
JsLightArrayInteger
public JsLightArrayInteger(com.google.gwt.core.client.JavaScriptObject array)
JsLightArrayInteger
with a given javascript arrayarray
- the array to usepublic void push(int value)
LightArrayInt
push
in interface LightArrayInt
public int shift()
LightArrayInt
shift
in interface LightArrayInt
public int get(int index)
LightArrayInt
get
in interface LightArrayInt
index
- the indexpublic void set(int index, int value)
LightArrayInt
set
in interface LightArrayInt
index
- the indexvalue
- the value to storepublic int length()
LightArrayInt
length
in interface LightArrayInt
public void unshift(int value)
LightArrayInt
unshift
in interface LightArrayInt
value
- to pushpublic com.google.gwt.core.client.JavaScriptObject getArray()
Copyright © 2016 Magnolia International Ltd.. All rights reserved.