A class supporting filtered operations .
Adds two or more key/value mappings and return the map itself .
Add a new key/value mapping and return the map itself .
Adds a number of elements provided by a traversable object
via its iterator
method and returns
either the collection itself (if it is mutable), or a new collection
with the added elements.
[use case] Concatenates this multimap with the elements of a traversable collection .
Concatenates this multimap with the elements of a traversable collection .
adds all elements produced by a TraversableOnce to this multimap .
adds two or more elements to this multimap .
Adds a new key/value pair to this map .
Removes two or more elements from this collection and returns the collection itself .
Delete a key from this map if it is present and return the map itself .
Removes a number of elements provided by a Traversable object and returns the collection itself .
Removes all elements produced by an iterator from this multimap .
Removes two or more elements from this multimap .
Removes a key from this map .
Applies a binary operator to a start value and all elements of this multimap, going left to right .
Applies a binary operator to all elements of this multimap and a start value, going right to left .
Assigns the specified value
to a specified key
, replacing
the existing value assigned to that key
if it is equal to
the specified value.
Appends all bindings of this map to a string builder using start, end, and separator strings .
Appends all elements of this multimap to a string builder .
Appends all elements of this multimap to a string builder using a separator string .
Composes this partial function with a transformation function that gets applied to results of this partial function .
Retrieves the value which is associated with the given key .
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind .
Removes all bindings from the map .
This method creates and returns a copy of the receiver object .
[use case] Builds a new collection by applying a partial function to all elements of this multimap on which the function is defined .
Builds a new collection by applying a partial function to all elements of this multimap on which the function is defined .
The factory companion object that builds instances of class MultiMap
(f compose g)(x) == f(g(x))
Tests whether this map contains a binding for a key .
[use case] Copies elements of this multimap to an array .
Copies elements of this multimap to an array .
[use case] Copies values of this multimap to an array .
Copies values of this multimap to an array .
[use case] Copies values of this multimap to an array .
Copies values of this multimap to an array .
Copies all elements of this multimap to a buffer .
Counts the number of elements in the multimap which satisfy a predicate .
Defines the default value computation for the map, returned when a key is not found The method implemented here throws an exception, but it might be overridden in subclasses .
Selects all elements except first n ones.
Selects all elements except last n ones.
Drops longest prefix of elements that satisfy a predicate .
The empty map of the same type as this map
Checks if there exists a binding to key
such that it satisfies the predicate p
.
Compares two maps structurally; i .
Tests whether a predicate holds for some of the elements of this multimap .
Selects all elements of this multimap which satisfy a predicate .
Filters this map by retaining only keys satisfying a predicate .
Returns a new map with all key/value pairs for which the predicate
p
returns true
.
Finds the first element of the multimap satisfying a predicate, if any .
None
if iterable is empty.
[use case] Builds a new collection by applying a function to all elements of this multimap and concatenating the results .
Builds a new collection by applying a function to all elements of this multimap and concatenating the results .
[use case] Converts this multimap of traversable collections into a multimap in which all element collections are concatenated .
Converts this multimap of traversable collections into a multimap in which all element collections are concatenated .
Applies a binary operator to a start value and all elements of this multimap, going left to right .
Applies a binary operator to all elements of this multimap and a start value, going right to left .
Tests whether a predicate holds for all elements of this multimap .
[use case] Applies a function f
to all elements of this multimap.
Applies a function f
to all elements of this multimap.
The generic builder that builds instances of MultiMap
Optionally returns the value associated with a key .
[use case] Returns the value associated with a key, or a default value if the key is not contained in the map .
Returns the value associated with a key, or a default value if the key is not contained in the map .
If given key is already in this map, returns associated value .
Partitions this multimap into a map of multimaps according to some discriminator function .
Partitions elements in fixed size multimaps .
Tests whether this multimap is known to have a finite size .
Returns a hash code value for the object .
Selects the first element of this multimap .
Optionally selects the first element .
Selects all elements except the last .
Tests whether this map contains a binding for a key .
Tests whether the map is empty .
Tests whether this multimap can be repeatedly traversed .
Creates a new iterator over all key/value pairs of this map
Collects all keys of this map in a set .
Creates an iterator for all keys .
Creates an iterator for all keys .
Selects the last element .
Optionally selects the last element .
Turns this partial function into an plain function returning an Option
result.
[use case] Builds a new collection by applying a function to all elements of this multimap .
Builds a new collection by applying a function to all elements of this multimap .
Creates a new builder by applying a transformation function to the results of this builder .
Transforms this map by applying a function to every retrieved value .
[use case] Finds the largest element .
Finds the largest element .
[use case] Finds the smallest element .
Finds the smallest element .
Displays all elements of this multimap in a string .
Displays all elements of this multimap in a string using a separator string .
Displays all elements of this multimap in a string using start, end, and separator strings .
Tests whether the multimap is not empty .
Composes this partial function with a fallback partial function which gets applied where this partial function is not defined .
Partitions this multimap in two multimaps according to a predicate .
[use case] Multiplies up the elements of this collection .
Multiplies up the elements of this collection .
returns a projection that can be used to call non-strict filter
,map
, and flatMap
methods that build projections
of the collection.
Adds a new key/value pair to this map and optionally returns previously bound value .
Applies a binary operator to all elements of this multimap, going left to right .
Optionally applies a binary operator to all elements of this multimap, going left to right .
Applies a binary operator to all elements of this multimap, going right to left .
Optionally applies a binary operator to all elements of this multimap, going right to left .
Removes a key from this map, returning the value associated previously with that key as an option .
Removes the binding of value
to key
if it exists.
If given key is defined in this map, remove it and return associated value as an Option .
The collection of type multimap underlying this TraversableLike
object.
The result when this map is used as a builder
Retains only those mappings for which the predicate
p
returns true
.
[use case] Checks if the other iterable collection contains the same elements in the same order as this multimap .
Checks if the other iterable collection contains the same elements in the same order as this multimap .
Produces a collection containing cummulative results of applying the operator going left to right .
Produces a collection containing cummulative results of applying the operator going right to left .
The size of this multimap .
Gives a hint how many elements are expected to be added
when the next result
is called.
Selects an interval of elements .
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped .
Splits this multimap into a prefix/suffix pair according to a predicate .
Splits this multimap into two at a given position .
Defines the prefix of this object's toString
representation.
[use case] Sums up the elements of this collection .
Sums up the elements of this collection .
Selects all elements except the first .
Selects first n elements.
Selects last n elements.
Takes longest prefix of elements that satisfy a predicate .
[use case] Converts this multimap to an array .
Converts this multimap to an array .
Converts this multimap to an indexed sequence .
Converts this multimap to an iterable collection .
Returns an Iterator over the elements in this multimap .
Converts this multimap to a list .
Converts this multimap to a map .
Converts this multimap to a sequence .
Converts this multimap to a set .
Converts this multimap to a stream .
Converts this multimap to a string .
Converts this multimap to an unspecified Traversable .
Applies a transformation function to all values contained in this map .
Transposes this multimap of traversable collections into a multimap of multimaps .
Converts this multimap of pairs into two collections of the first and second halfs of each pair .
Adds a new key/value pair to this map .
Creates a new map consisting of all key/value pairs of the current map plus a new pair of a given key and value .
Collects all values of this map in an iterable collection .
Creates an iterator for all values in this map .
Creates a non-strict view of a slice of this multimap .
Creates a non-strict view of this multimap .
Creates a non-strict filter of this multimap .
[use case] Returns a multimap formed from this multimap and another iterable collection by combining corresponding elements in pairs .
Returns a multimap formed from this multimap and another iterable collection by combining corresponding elements in pairs .
[use case] Returns a multimap formed from this multimap and another iterable collection by combining corresponding elements in pairs .
Returns a multimap formed from this multimap and another iterable collection by combining corresponding elements in pairs .
[use case] Zips this multimap with its indices .
Zips this multimap with its indices .
A trait for mutable maps with multiple values assigned to a key .
This class is typically used as a mixin. It turns maps which map
A
toSet[B]
objects into multi maps which mapA
toB
objects.