Objects that will be transformed to Strings and used as the initial values of the set.
Implement the generator. StringSet can be used e.g. in for...of
Add an element to the set
Element to be added
The element str itself
A new copy of the set
Stores in this set the difference of it with another another set (i.e.
this - otherSet). Notice that this is not equivalent to otherSet - thisSet.
Check if element exists in the set
Element to be checked
True if exists, false otherwise
Stores in this set the intersection of it with another another set
True if the set is empty, false otherwise
Remove an element from the set if it exists
Element to be removed
True if the element str existed and was removed, false
otherwise
A comma seperated list of the values in this set, delimited by brackets to denote a set like data-structure
Stores in this set the union of it with another another set
A list of the elements in the set
StaticdifferenceStaticintersectionStaticunion
~Based on this code: https://stackoverflow.com/questions/4343746/is-there-a-data-structure-like-the-java-set-in-javascript
Changed the name of functions 'contains' to the name used in ECMAScript 6 ('has'). 'remove' has not been changed to 'delete' because in LARA 'delete' is a keyword and cannot be used as a function name Also, tweaked the functionality of 'add' and 'delete' to behave similarly to ECMAScript 6 Set.~
Implementation changed to use a standard javascript Set instead of a custom implementation.
Deprecated
Use a standard Set instead