-
Notifications
You must be signed in to change notification settings - Fork 1
ArrayCollection
jay19240 edited this page Dec 11, 2024
·
2 revisions
Generic class that represents a collection of items and provides event-based features.
-
new ArrayCollection(items: T[]): ArrayCollection
-
items: The
items
underlying collection's data.
-
items: The
- clear(): void
- getItems()
-
has(item: T): boolean
- item: The item.
-
pop(emit: boolean)
-
emit: If
emit
is set totrue
, an event with the name 'E_ITEM_REMOVED' will be emitted.
-
emit: If
-
push(item: T, emit: boolean): number
- item: The item.
-
emit: If
emit
is set totrue
, an event with the name 'E_ITEM_ADDED' will be emitted.
-
remove(item: T, emit: boolean): number
- item: The item.
-
emit: If
emit
is set totrue
, an event with the name 'E_ITEM_REMOVED' will be emitted.
-
removeAt(index: number, emit: boolean): T
- index: The index.
-
emit: If
emit
is set totrue
, an event with the name 'E_ITEM_REMOVED' will be emitted.