ArraySet
ArraySet
Structure with event signals for observing changes. Implemented using an Array
Kind: global class
Properties
| Name | Type |
|---|---|
| on | Object |
- ArraySet
- new ArraySet([array])
- .on
- .size ⇒
number - .contains(el)
- .add(el)
- .remove(el)
- .isEmpty() ⇒
boolean - .clear()
- .addAll(elements)
- .setFromArray(source)
- .forEach(visitor, [thisArg])
- .asArray() ⇒
Array.<T>
new ArraySet([array])
| Param | Type | Default |
|---|---|---|
| [array] | Array.<T> | [] |
arraySet.on
Kind: instance property of ArraySet
Read only: true
arraySet.size ⇒ number
Kind: instance property of ArraySet
arraySet.contains(el)
Kind: instance method of ArraySet
| Param | Type |
|---|---|
| el | T |
arraySet.add(el)
Kind: instance method of ArraySet
| Param | Type |
|---|---|
| el | T |
arraySet.remove(el)
Kind: instance method of ArraySet
| Param | Type |
|---|---|
| el | T |
arraySet.isEmpty() ⇒ boolean
Kind: instance method of ArraySet
arraySet.clear()
Remove all elements from the set
Kind: instance method of ArraySet
arraySet.addAll(elements)
Kind: instance method of ArraySet
| Param | Type |
|---|---|
| elements | Array.<T> |
arraySet.setFromArray(source)
Performs a diff on the set and provided collection, elements in the set but not in input are removed and elements in the input but not in the set are added.
Kind: instance method of ArraySet
| Param | Type |
|---|---|
| source | Array.<T> |
arraySet.forEach(visitor, [thisArg])
Kind: instance method of ArraySet
| Param | Type |
|---|---|
| visitor | function |
| [thisArg] | * |
arraySet.asArray() ⇒ Array.<T>
Kind: instance method of ArraySet