Class ArrayDoubleArray
- java.lang.Object
-
- org.pepstock.charba.client.commons.Array
-
- org.pepstock.charba.client.commons.ArrayDoubleArray
-
- All Implemented Interfaces:
IsJSType
@JsType(isNative=true, name="Array", namespace="<global>") public final class ArrayDoubleArray extends ArrayArray object which maps the java script object.
A simple wrapper around a homogeneous native array of arrays of numeric (doubles) values.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E extends NativeArrayContainer<ArrayDouble>>
ArrayDoubleArrayfromOrEmpty(E item)Creates a java script array of arrays starting from a native array containers and the array will have ONE 1 element.static <E extends NativeArrayContainer<ArrayDouble>>
ArrayDoubleArrayfromOrEmpty(E[] items)Creates a java script array of arrays starting from an array of native array containers.static <E extends NativeArrayContainer<ArrayDouble>>
ArrayDoubleArrayfromOrEmpty(List<E> items)Creates a java script array of arrays starting from a list of native array containers.static <E extends NativeArrayContainer<ArrayDouble>>
ArrayDoubleArrayfromOrNull(E item)Creates a java script array of arrays starting from a native array containers and the array will have ONE 1 element.static <E extends NativeArrayContainer<ArrayDouble>>
ArrayDoubleArrayfromOrNull(E[] items)Creates a java script array of arrays starting from an array of native array containers.static <E extends NativeArrayContainer<ArrayDouble>>
ArrayDoubleArrayfromOrNull(List<E> items)Creates a java script array of arrays starting from a list of native array containers.ArrayDoubleget(int index)Gets the value at a given index.
-
-
-
Method Detail
-
fromOrNull
@JsOverlay public static <E extends NativeArrayContainer<ArrayDouble>> ArrayDoubleArray fromOrNull(E item)
Creates a java script array of arrays starting from a native array containers and the array will have ONE 1 element.- Type Parameters:
E- type of native array containers- Parameters:
item- single array to load in the new java script array.- Returns:
- new array instance of ONE 1 element or
nullif argument isnull
-
fromOrEmpty
@JsOverlay public static <E extends NativeArrayContainer<ArrayDouble>> ArrayDoubleArray fromOrEmpty(E item)
Creates a java script array of arrays starting from a native array containers and the array will have ONE 1 element.- Type Parameters:
E- type of native array containers- Parameters:
item- list of arrays to load in the new java script array.- Returns:
- new array instance of ONE 1 element or an empty array if argument is
null
-
fromOrNull
@JsOverlay public static <E extends NativeArrayContainer<ArrayDouble>> ArrayDoubleArray fromOrNull(E[] items)
Creates a java script array of arrays starting from an array of native array containers.- Type Parameters:
E- type of native array containers- Parameters:
items- list of arrays to load in the new java script array.- Returns:
- new array instance of arrays or
nullif argument isnullor length to 0
-
fromOrEmpty
@JsOverlay public static <E extends NativeArrayContainer<ArrayDouble>> ArrayDoubleArray fromOrEmpty(E[] items)
Creates a java script array of arrays starting from an array of native array containers.- Type Parameters:
E- type of native array containers- Parameters:
items- list of arrays to load in the new java script array.- Returns:
- new array instance of arrays or an empty array if argument is
nullor length to 0
-
fromOrNull
@JsOverlay public static <E extends NativeArrayContainer<ArrayDouble>> ArrayDoubleArray fromOrNull(List<E> items)
Creates a java script array of arrays starting from a list of native array containers.- Type Parameters:
E- type of native array containers- Parameters:
items- list of arrays to load in the new java script array.- Returns:
- new array instance of arrays or
nullif the argument isnullor empty
-
fromOrEmpty
@JsOverlay public static <E extends NativeArrayContainer<ArrayDouble>> ArrayDoubleArray fromOrEmpty(List<E> items)
Creates a java script array of arrays starting from a list of native array containers.- Type Parameters:
E- type of native array containers- Parameters:
items- list of arrays to load in the new java script array.- Returns:
- new array instance of arrays or an empty array if argument is
nullor empty
-
get
@JsOverlay public ArrayDouble 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
-
-