MultiMap

MultiMap

MultiMap representation

Constructor

new MultiMap()

Implements:

Extends

Methods

containsEntry(key, value) → {boolean}

Implements:
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}

Implements:
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}

Implements:
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)

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