Creates an instance of an ArrayCollection class.
The object that owns this collection.
Protected
_elemDefines the type constraints for the collection element.
Unique identifier of the object (GUID). Uniquely identifies the object.
Readonly
_listAn array that stores a list of elements in a collection. This array contains actual data from the collection.
Protected
_ownerOwned object of the collection.
The generator function of the object. The function used when the object was created.
Readonly
countReturns the number of elements in the current collection.
Readonly
lengthReturns the number of elements in the current collection.
Static
Readonly
_NSIndicates the namespace.
Static
Readonly
_PARAMList of parameters used for the constructor.
Static
Readonly
_UNIONList of implemented interfaces.
Protected
_getDeletes an element in a specified location in the collection. This method deletes the element by implementing the abstract method '_remove'. (Use template method patterns)
Index of the element to be deleted.
This is a Boolean value that indicates whether deletion is successful or not.
Test that all elements pass the test implemented with the provided function.
콜백함수 입니다. (currentValue, index, array) => boolean
Optional
thisArg: anyThe value to use as this when executing the callback function.
True if you return a true value for all array elements, otherwise false.
Filter only to elements that have passed the test implemented by the provided function
콜백함수 입니다.(currentValue, index, array) => boolean
Optional
thisArg: anyThe value to use as this when executing the callback function.
Returns a new array of results.
Returns the first element that satisfies the provided test function
This is the callback function. (currentValue, index, array) => any
Optional
thisArg: anyThe value to use as this when executing the callback function.
The first element in the array that satisfies the test function. If no element satisfies the test function, undefined is returned.
Returns the first element that satisfies the provided test function
콜백함수 입니다. (currentValue, index, array) => boolean
Optional
thisArg: anyThe value to use as this when executing the callback function. Index of the first element that passes the @returns{number} test. If no match exists, return -1.
Run the function provided for each element once.
This is the callback function. (currentValue, index, array) => void
Optional
thisArg: anyThe value to use as this when executing the callback function.
Returns array collection objects in serialization. Circular references are replaced by values of '$ref'.
Optional
vOpt: numberSerialization option. (Default: 0)
Optional
owned: object | object[]Serialized collection object.
Adds an element to a specified location in an array collection.
The location of the index to be added.
The element to add.
Optional
desc: PropertyDescriptorProperty descriptor object for element. Optional.
This is a Boolean value that indicates whether the element has been added successfully.
Collects the results of calling a given function for each element and returns a new array.
This is the callback function (currentValue, index, array) => any[]
Optional
thisArg: anyThe value to use as this when executing the callback function.
Returns a new array of results.
Run the given reducer function for each element and return one result.
콜백함수 입니다. (accumulator, currentValue, index, array) => any
Optional
initialValue: anyUse the first element of the array if it does not provide an initial value.
Returns a new array of results.
Test that at least one element passes through a given discriminant function.
콜백함수 입니다. (currentValue, index, array) => boolean
Optional
thisArg: anyThe value to use as this when executing the callback function.
Returns true if you return a true value for one element, or false.
Events that occur before adding an element to a collection.
BaseCollection#onAdd
Index of the element to be added.
The element to add.
current collection object.
Events that occur after you add an element to a collection.
BaseCollection#onAdded
Index of added elements.
Added element.
current collection object.
Events that occur after you change an element in a collection.
BaseCollection#onChanged
Index of the changed element.
Changed element.
current collection object.
An event that occurs before you change an element in a collection.
BaseCollection#onChanging
Index of the element to be changed.
The element to be changed.
current collection object.
Events that occur before the collection is initialized.
BaseCollection#onClear
current collection object.
Events that occur after the collection is initialized.
BaseCollection#onCleared
current collection object.
An event that occurs before an element is deleted from the collection.
BaseCollection#onRemove
Index of the element to be deleted.
The element to delete.
current collection object.
Events that occur after you delete an element from a collection.
BaseCollection#onRemoved
Index of deleted elements.
Deleted element.
current collection object.
The 'Array Collection' class inherits the 'Base Collection' and implements the 'IAray Collection' interface. This class manages collections in the form of arrays and provides a variety of methods for array-related tasks.
Implements
IArrayCollection
Example