Returns true if the map is empty
Returns the number of keys
Returns the type name. For in-built implementations, it will be one of: array, set or circular
Adds event listener.
Events
Event name
Event handler
Adds several values
under the same key
. Duplicate values are permitted, depending on implementation.
Rest
...values: readonly V[]Adds a value, automatically extracting a key via the
groupBy
function assigned in the constructor options.
Rest
...values: readonly V[]Adds several values
Delete all occurrences of value
, regardless of
key it is stored under.
Returns true if something was deleted.
Deletes all values under key
that match value
.
Key
Value
Protected
fireFire event
Type of event
Arguments for event
Remove event listener
Like a
Map
but multiple values can be stored for each key. Duplicate values can be added to the same or even a several keys.Three pre-defined MapOf's are available:
Adding
Finding/accessing
Removing
Metadata about the map:
Events can be listened to via
addEventListener
addedKey
,addedValue
- when a new key is added, or when a new value is addedclear
- when contents are cleareddeleteKey
- when a key is deletedExample: Event example