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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringAdds an element to arraystatic StringAdds all elements from an array to anotherstatic StringaddOrReplace(String array, String index, String element) Adds or replace an element in arraystatic Stringstatic StringcontainsByProperty(String array, String property, String value) static StringfindByProperty(String array, String property, String value) static StringfindIndexByProperty(String array, String property, String value) static StringletFindByProperty(String variable, String array, String property, String value) static StringletRemoveByProperty(String variable, String array, String property, String value) static StringRemove an element from arraystatic StringremoveByProperty(String array, String property, String value) Remove an element from array by propertystatic StringReplace 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
-