A generic collection class that extends Map to store objects with their IDs.
The type of objects stored in the collection.
Constructs a new Collection object.
The client instance to be used for creating items.
The constructor function for items in the collection.
Optional
The maximum number of items allowed in the collection.
Adds an item to the collection.
The ID of the item.
The data of the item.
Clears all items from the collection.
Retrieves an item from the collection by its ID.
The item if found, otherwise undefined.
Checks if an item exists in the collection by its ID.
True if the item exists, otherwise false.
Removes an item from the collection by its ID.
True if the item was removed, otherwise false.
Returns an array of all items in the collection.
An array of all items.
A generic collection class that extends Map to store objects with their IDs.