MultiMapInterface

MultiMapInterface

Maps one key to multiple values but does not contain duplicate kv pairs

Methods

containsEntry(key, value) → {boolean}

Reports whether the multimap contains the given entry
Parameters:
Name Type Description
key * The key
value * The value
Returns:
True if @param key is mapped to @param value
Type
boolean

put(key, value) → {MultiMap}

Maps the given value to the given key. Does not add duplicate values
Parameters:
Name Type Description
key * The key to map to the given value
value * The value mapped to by @param key
Returns:
The instance this method was called with
Type
MultiMap

removeVal(key, value) → {Array}

Removes the value associated with the given key
Parameters:
Name Type Description
key * The key to remove the value from
value * The value
Returns:
The removed value of an empty array if not found
Type
Array

replaceVal(key, oldValue, newValue)

Replaces the given value mapped to by the given key
Parameters:
Name Type Description
key * The key
oldValue * The oldValue
newValue * The updated value