Skip to main content

ArraySet

ArraySet

Structure with event signals for observing changes. Implemented using an Array

Kind: global class
Properties

NameType
onObject

new ArraySet([array])

ParamTypeDefault
[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

ParamType
elT

arraySet.add(el)

Kind: instance method of ArraySet

ParamType
elT

arraySet.remove(el)

Kind: instance method of ArraySet

ParamType
elT

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

ParamType
elementsArray.<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

ParamType
sourceArray.<T>

arraySet.forEach(visitor, [thisArg])

Kind: instance method of ArraySet

ParamType
visitorfunction
[thisArg]*

arraySet.asArray() ⇒ Array.<T>

Kind: instance method of ArraySet