Constructor
True if empty
Returns the count of keys.
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
Deletes value
regardless of key.
Uses the constructor-defined equality function.
Value to delete
Delete value
under a particular key
True if value
was found under key
Returns true if value
exists under key
.
Key
Value to seek under key
True if value
exists under key
.
Set values
to key
.
Previous data stored under key
is thrown away.
Yields the values for each key in sequence, returning an array. Use valuesFlat to iterate over all keys regardless of key.
A simple mutable map of arrays, without events. It can store multiple values under the same key.
For a fancier approaches, consider ofArrayMutable, ofCircularMutable or ofSetMutable.
Example
Constructor takes a
groupBy
parameter, which yields a string key for a value. This is the basis by which values are keyed when usingaddValues
.Constructor takes a
valueEq
parameter, which compares values. This is used when checking if a value exists under a key, for example.