goog.labs.structs.Multimap
Classgoog.labs.structs.Multimap()
Creates a new multimap.
.add(key, value)
Adds the given (key, value) pair to the map. The (key, value) pair is guaranteed to be added.
key
{string
}
value
{*}
.addAllFromMultimap(map)
Adds the contents of the given map/multimap to this multimap.
map
{!(goog.labs.structs.Map
|goog.labs.structs.Multimap
)}
.addAllValues(key, values)
Stores a collection of values to the given key. Does not replace existing (key, value) pairs.
key
{string
}
values
{!Array
.<*>}
.clear()
Clears the multimap.
.clone()
Clones this multimap.
goog.labs.structs.Multimap
}
.containsEntry(key, value)
key
{string
}
value
{string
}
boolean
}
.containsKey(key)
key
{string
}
boolean
}
.containsValue(value)
value
{*}
boolean
}
.get(key)
Gets the values correspond to the given key.
key
{string
}
Array
.<*>}
.getCount()
number
}
.getEntries()
Array
.<!Array
>}
.getKeys()
Array
.<string
>}
.getValues()
Array
.<*>}
.isEmpty()
boolean
}
.remove(key, value)
Removes a single occurrence of (key, value) pair.
key
{string
}
value
{*}
boolean
}
.removeAll(key)
Removes all values corresponding to the given key.
key
{string
}
boolean
}
.replaceValues(key, values)
Replaces all the values for the given key with the given values.
key
{string
}
values
{!Array
.<*>}