The type of the items in the collection. It is recommended to use a read-only type here.
Creates an empty collection.
Private
indexesPrivate
lastPrivate
storePrivate
newPrivate
propagateRegisters an UnregisteredIndex to a collection, returning the Index that can be used to query the collection.
You likely want to use this before you populate the collection, as it needs to iterate over all the existing items in the collection to build the index.
Complexity: O(n) where n is the number of items already in the collection.
Updates a value in the collection, if it exists.
Complexity: O(1)
Most generic way to update an item in the collection.
Complexity: O(1)
Takes either the existing value, or undefined
if it doesn't
exist, and returns a tuple of the new value and the return value.
If the new value is undefined
, existing item is deleted.
ConflictException if the index invariant is violated
ConditionFailedException if the precondition fails
Complexity: O(1)
The deleted value, or undefined
if doesn't exist.
Creates or updates a item in the collection.
Complexity: O(1)
Generated using TypeDoc
Maintains a collection of items, and keeps the registered indexes up to date.
Example