KeyedMultiCollection<K, V> Interface
Package: @esfx/collection-core
Declaration
export interface KeyedMultiCollection<K, V> extends ReadonlyKeyedMultiCollection<K, V>
Inherited Members
Methods
[KeyedMultiCollection.add](key, value)
Adds a value to the collection for the provided key.
Declaration
[KeyedMultiCollection.add](key: K, value: V): void;
Parameters
- key
- K
- value
- V
Returns
void
[KeyedMultiCollection.clear]()
Clears the collection.
Declaration
[KeyedMultiCollection.clear](): void;
Returns
void
[KeyedMultiCollection.delete](key)
Deletes a key and its associated values from the collection.
Declaration
[KeyedMultiCollection.delete](key: K): number;
Parameters
- key
- K
Returns
The number of values removed when the key was deleted.
[KeyedMultiCollection.deleteValue](key, value)
Deletes a key and its associated value from the collection.
Declaration
[KeyedMultiCollection.deleteValue](key: K, value: V): boolean;
Parameters
- key
- K
- value
- V
Returns
true
if the key and value were found and removed; otherwise, false
.