set
Sets the given value to this MutableListMap.
If the given key already exists in this map it will be overwritten with a new list containing only the given value.
Example
listMap == {
"foo" = ["bar", "fizz", "buzz"]
}
key == "foo"
value == "happy"
listMap.add(key, value)
listMap == {
"foo" = ["happy"]
}Parameters
Key of the value to add.
Value to add.
Sets the given values to this MutableListMap.
If the given key already exists in this map, it will be overwritten with the given array of values.
Example
listMap == {
"foo" = ["bar", "fizz", "buzz"]
}
key == "foo"
values == ["happy", "sad"]
listMap.add(key, values)
listMap == {
"foo" = ["happy", "sad"]
}Parameters
Key of the value to add.
Values to add.
Sets the given values to this MutableListMap.
If the given key already exists in this map, it will be overwritten with the given collection of values.
Example
listMap == {
"foo" = ["bar", "fizz", "buzz"]
}
key == "foo"
values == ["happy", "sad"]
listMap.add(key, values)
listMap == {
"foo" = ["happy", "sad"]
}Parameters
Key of the value to add.
Values to add.
Sets the given values to this MutableListMap.
If any key in the given Map overlaps with a key in this MutableListMap, the values in this MutableListMap will be replaced by value in the input map the list at the overlapping key.
Example
listMap == {
"foo" = ["bar", "fizz", "buzz"]
}
input == {
"foo" = ["happy", "sad"]
}
listMap.add(input)
listMap == {
"foo" = ["happy", "sad"]
}Parameters
Map of values to add to this MutableListMap