Constructor for creating an instance of the class.
The mutable reference object for the collection.
The subject used for disposing.
Clears the collection.
Filters the items in the collection based on the provided function.
A function used to filter the collection items. The function should accept two parameters: value and idx.
Finds the first element in the collection that satisfies the given condition.
The condition to be satisfied.
Finds an entity by its ID in the current collection.
The ID of the entity to be found.
Performs a given function on each element of the collection.
The function to be executed on each element. The function should take two parameters: the current value in the collection and the index of the current value.
Maps over the items in the collection and returns an array of values.
The mapping function.
Asynchronously pushes item(s) to the collection.
Refreshes the current collection after waiting for listeners.
A promise that resolves after the collection is refreshed.
Removes an entity from the collection.
Removes all items from the collection.
A promise that resolves once all items are removed.
Removes an item from the collection by its ID.
The ID of the item to remove.
A promise that resolves with no value.
Sets new data for the collection.
Checks if any element of the collection satisfies the provided testing function.
The testing function to apply to each element of the collection. It should take two arguments: the current element of the collection and its index. Returns a boolean value indicating whether the element satisfies the testing condition.
Retrieves an array representation of the current collection.
Retrieve the current value of the collection.
The current value of the collection.
Upserts one or more items into the current collection.
Retrieves the IDs from the current collection.
The IDs from the current collection.
Retrieve the items from the current collection.
An array of CollectionEntityAdapter instances.
Returns the last index from the current collection.
The last index of the current collection.
CollectionAdapter class is used to adapt a collection of entities. It provides various methods for manipulating and accessing the collection.
Typeparam
T - The type of entity in the collection