True if empty
Returns the count of keys.
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
Clear contents
Return number of values stored under key
.
Returns 0 if key
is not found.
Debug dump of contents
Deletes all values under key
,
True if key
was found and values stored
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
Iterate over keys and array of values for that key
Iterate over all entries
Returns true if key
exists
Returns true if value
exists under key
.
Key
Value to seek under key
True if value
exists under key
.
Iterate over all keys
Iterate over keys and length of values stored under keys
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.