add
Adds the given value to this MutableListMap.
If the given key already exists in this map, the given value will be appended to the list at that key.
Example
listMap == {
"foo" = ["bar", "fizz", "buzz"]
}
key == "foo"
value == "happy"
listMap.add(key, value)
listMap == {
"foo" = ["bar", "fizz", "buzz", "happy"]
}Content copied to clipboard
Parameters
key
Key of the value to add.
value
Value to add.
Adds the given values to this MutableListMap.
If the given key already exists in this map, the given values will be appended to the list at that key.
Example
listMap == {
"foo" = ["bar", "fizz", "buzz"]
}
key == "foo"
values == ["happy", "sad"]
listMap.add(key, values)
listMap == {
"foo" = ["bar", "fizz", "buzz", "happy", "sad"]
}Content copied to clipboard
Parameters
key
Key of the value to add.
values
Values to add.
Adds the given values to this MutableListMap.
If any key in the given Map overlaps with a key in this MutableListMap, the values in the input map will be appended to the list at the overlapping key in this map.
Example
listMap == {
"foo" = ["bar", "fizz", "buzz"]
}
input == {
"foo" = ["happy", "sad"]
}
listMap.add(input)
listMap == {
"foo" = ["bar", "fizz", "buzz", "happy", "sad"]
}Content copied to clipboard
Parameters
values
Map of values to add to this MutableListMap