goog.labs.structs.Multimap<K, V>
Provided By |
---|
Creates a new multimap.
new Multimap<K, V>()
Parameters | None. |
---|
Instance Methods
this.add( key, value ) → void
void
Adds the given (key, value) pair to the map. The (key, value) pair is guaranteed to be added.
Parameters |
|
---|
this.addAllFromMultimap( map ) → void
void
Adds the contents of the given map/multimap to this multimap.
Parameters |
|
---|
this.addAllValues( key, values ) → void
void
Stores a collection of values to the given key. Does not replace existing (key, value) pairs.
Parameters |
|
---|
this.clear() → void
void
Clears the multimap.
this.clone() → goog.labs.structs.Multimap<(K|null), (V|null)>
goog.labs.structs.Multimap<(K|null), (V|null)>
Clones this multimap.
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.containsEntry( key, value ) → boolean
boolean
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
this.containsKey( key ) → boolean
boolean
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.containsValue( value ) → boolean
boolean
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.get( key ) → Array<(V|null)>
Array<(V|null)>
Gets the values correspond to the given key.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.getCount() → number
number
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getKeys() → Array<(K|null)>
Array<(K|null)>
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getValues() → Array<(V|null)>
Array<(V|null)>
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.isEmpty() → boolean
boolean
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.remove( key, value ) → boolean
boolean
Removes a single occurrence of (key, value) pair.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
this.removeAll( key ) → boolean
boolean
Removes all values corresponding to the given key.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.replaceValues( key, values ) → void
void
Replaces all the values for the given key with the given values.
Parameters |
|
---|