Adds several values
under the same key
. Duplicate values are permitted, depending on implementation.
Adds a value, automatically extracting a key via the
groupBy
function assigned in the constructor options.
Adds several values
Clears the map
Returns the number of values stored under key
, or 0 if key
is not present.
Key
Delete all occurrences of value
, regardless of
key it is stored under.
Deletes all values under key
that match value
.
Key
Value
Iterates over key-value pairs. Unlike a normal map, the same key may appear several times.
Returns true if key
has any values
Iterates over all keys
Iteates over all keys and the count of values therein
Iterates over all values, regardless of key. Same value may re-appear if it's stored under different keys.
Like a
Map
but multiple values can be stored for each key. Immutable. Duplicate values can be added to the same or even a several keys.Adding
Finding/accessing
Removing
Metadata about the map:
Type Param: M
Type of data structure managing values