Constructor
new MultiMap()
A simple multimap template.
- Source:
Members
-
(private, non-null) map_ :Object.<string, !Array.<T>>
-
Type:
- Object.<string, !Array.<T>>
- Source:
Methods
-
clear()
-
Clear all keys and values from the multimap.
- Source:
-
get(key) → {Array.<T>}
-
Get a list of values by key.
Parameters:
Name Type Description key
string - Source:
Returns:
or null if no such key exists.- Type
- Array.<T>
-
getAll() → (non-null) {Array.<T>}
-
Get a list of all values.
- Source:
Returns:
- Type
- Array.<T>
-
push(key, value)
-
Add a key, value pair to the map.
Parameters:
Name Type Description key
string value
T - Source:
-
remove(key, value)
-
Remove a specific value, if it exists.
Parameters:
Name Type Description key
string value
T - Source: