Class ArrayMixedObject
- java.lang.Object
-
- org.pepstock.charba.client.commons.Array
-
- org.pepstock.charba.client.commons.ArrayMixedObject
-
- All Implemented Interfaces:
IsJSType
@JsType(isNative=true, name="Array", namespace="<global>") public final class ArrayMixedObject extends Array
Array object which maps the java script object.
A simple wrapper around a homogeneous array of mixed type of object (extension of java script objects) values.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description ArrayMixedObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
get(int index)
Gets the value at a given index.void
push(Object item)
Adds one element to the end of an array.Object
remove(int index)
Removes the element at the specified position in this array.
-
-
-
Method Detail
-
remove
@JsOverlay public Object remove(int index)
Removes the element at the specified position in this array. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the array.- Parameters:
index
- the index of the element to be removed- Returns:
- the element previously at the specified position
-
get
@JsOverlay public Object get(int index)
Gets the value at a given index. If no value exists at the given index, a type-conversion error will occur in Development Mode and unpredictable behavior may occur in Production Mode. If the numeric value returned is non-integral, it will cause a warning in Development Mode, and may affect the results of mathematical expressions.- Parameters:
index
- the index to be retrieved- Returns:
- the value at the given index
-
push
public void push(Object item)
Adds one element to the end of an array.- Parameters:
item
- The element to add to the end of the array.
-
-