| Modifier and Type | Class and Description |
|---|---|
static interface |
ArrayObject.ArrayFilterCallback
Java script FUNCTION callback called to filter the array.
|
static interface |
ArrayObject.ArrayFindCallback
Java script FUNCTION callback called to find an element in the array.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayObject |
filter(ArrayObject.ArrayFilterCallback callback)
Creates a new array with all elements that pass the test implemented by the provided function.
|
NativeObject |
find(ArrayObject.ArrayFindCallback callback)
Returns the value of the first element in the provided array that satisfies the provided testing function.
If no values satisfy the testing function, undefined is returned. |
static <E extends NativeObjectContainer> |
fromOrEmpty(E item)
Creates a java script array of objects starting from a native object containers and the array will have ONE 1 element.
|
static <E extends NativeObjectContainer> |
fromOrEmpty(E[] items)
Creates a java script array of objects starting from an array of native object containers.
|
static <E extends NativeObjectContainer> |
fromOrEmpty(List<E> items)
Creates a java script array of objects starting from a list of native object containers.
|
static <E extends NativeObjectContainer> |
fromOrNull(E item)
Creates a java script array of objects starting from a native object containers and the array will have ONE 1 element.
|
static <E extends NativeObjectContainer> |
fromOrNull(E[] items)
Creates a java script array of objects starting from an array of native object containers.
|
static <E extends NativeObjectContainer> |
fromOrNull(List<E> items)
Creates a java script array of objects starting from a list of native object containers.
|
NativeObject |
get(int index)
Gets the value at a given index.
|
@JsOverlay public static <E extends NativeObjectContainer> ArrayObject fromOrNull(E item)
E - type of native object containersitem - single object to load in the new java script array.null if argument is null@JsOverlay public static <E extends NativeObjectContainer> ArrayObject fromOrEmpty(E item)
E - type of native object containersitem - list of objects to load in the new java script array.null@JsOverlay public static <E extends NativeObjectContainer> ArrayObject fromOrNull(E[] items)
E - type of native object containersitems - list of objects to load in the new java script array.null if argument is null or length to 0@JsOverlay public static <E extends NativeObjectContainer> ArrayObject fromOrEmpty(E[] items)
E - type of native object containersitems - list of objects to load in the new java script array.null or length to 0@JsOverlay public static <E extends NativeObjectContainer> ArrayObject fromOrNull(List<E> items)
E - type of native object containersitems - list of objects to load in the new java script array.null if the argument is null or empty@JsOverlay public static <E extends NativeObjectContainer> ArrayObject fromOrEmpty(List<E> items)
E - type of native object containersitems - list of objects to load in the new java script array.null or empty@JsOverlay public NativeObject get(int index)
index - the index to be retrievedpublic ArrayObject filter(ArrayObject.ArrayFilterCallback callback)
callback - is a predicate, to test each element of the array.public NativeObject find(ArrayObject.ArrayFindCallback callback)
callback - function to execute on each value in the array,