Class JsArray
java.lang.Object
io.github.jeemv.springboot.vuejs.utilities.JsArray
JsArray Javascript array utilities This class is part of springBoot-VueJS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Adds an element to arraystatic String
Adds all elements from an array to anotherstatic String
addOrReplace
(String array, String index, String element) Adds or replace an element in arraystatic String
static String
containsByProperty
(String array, String property, String value) static String
findByProperty
(String array, String property, String value) static String
findIndexByProperty
(String array, String property, String value) static String
letFindByProperty
(String variable, String array, String property, String value) static String
letRemoveByProperty
(String variable, String array, String property, String value) static String
Remove an element from arraystatic String
removeByProperty
(String array, String property, String value) Remove an element from array by propertystatic String
Replace an element at index position in array
-
Constructor Details
-
JsArray
public JsArray()
-
-
Method Details
-
remove
Remove an element from array- Parameters:
array
- the array referenceelement
- the element to remove- Returns:
-
replace
Replace an element at index position in array- Parameters:
array
- the array referenceindex
- The index of the element to replaceelement
- The element to replace with- Returns:
-
add
Adds an element to array- Parameters:
array
- The array referenceelement
- The element to add- Returns:
-
addOrReplace
Adds or replace an element in array- Parameters:
array
- The array referenceindex
- The index of the element to replace or -1 for addingelement
- The element to add or replace- Returns:
-
addAll
Adds all elements from an array to another- Parameters:
array
- The array referenceelements
- The elements to add- Returns:
-
removeByProperty
Remove an element from array by property- Parameters:
array
- The array referenceproperty
- The property to comparevalue
- The value to compare- Returns:
-
findByProperty
-
findIndexByProperty
-
containsByProperty
-
contains
-
letFindByProperty
-
letRemoveByProperty
-