Mutable Set Multimap
See also
Parameters
the type of map keys. The map is invariant in its key type.
the type of map values. The mutable map is invariant in its value type.
Functions
Returns a view of this multimap as a Map from each distinct key to the nonempty collection of that key's associated values. Note that this.asMap().get(k) is equivalent to this.get(k) only when k is a key contained in the multimap; otherwise it returns null as opposed to an empty collection.
Returns true if the multimap contains at least one key-value pair with the key key and the value value.
Returns true if the multimap contains the specified key.
Returns true if the multimap maps one or more keys to the specified value.
Returns a mutable view of the set of all the values corresponding to the given key in the multimap.
Properties
Returns a read-only Collection of all key/value pairs in this map.
Returns a read-only Collection of all values in this map. Note that this collection may contain duplicate values.
Extensions
Returns a string representation of this, with the format [e1, e2, ..., en] (that is, identical to Arrays.toString(Iterables.toArray(iterable))). Note that for most implementations of Collection, collection.toString() also gives the same result, but that behavior is not generally guaranteed.
Combines two iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in other. The source iterators are not polled until necessary.
Combines three iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in a, followed by the elements in b. The source iterators are not polled until necessary.
Combines four iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements in a, followed by the elements in b, followed by the elements in c. The source iterators are not polled until necessary.
Combines multiple iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this, followed by the elements of each iterable in iterables sequentially. The source iterators are not polled until necessary.
Returns a view of the supplied iterable that wraps each generated Iterator through Iterators.consumingIterator.
Returns an iterable whose iterators cycle indefinitely over the elements of this.
Returns an iterator that cycles indefinitely over the elements of this.
Returns a view of this containing all elements that satisfy the input predicate retainIfTrue.
Combines multiple iterables into a single iterable. The returned iterable has an iterator that traverses the elements in this sequentially. The source iterators are not polled until necessary.
Combines two iterators into a single iterator. The returned iterator iterates across the elements in this sequentially. The source iterators are not polled until necessary.
Returns an iterable over the merged contents of all given Iterables in this. Equivalent entries will not be de-duplicated.
Returns an iterator over the merged contents of all given this, traversing every element of the input iterators. Equivalent entries will not be de-duplicated.
Returns a Collection of all the permutations of the specified Iterable using naturalOrder for establishing the lexicographical ordering.
Returns a Collection of all the permutations of the specified Iterable using the specified selector for establishing the lexicographical ordering.
Returns a Collection of all the permutations of the specified Iterable using the specified comparator for establishing the lexicographical ordering.
Divides an iterable into unmodifiable sublists of the given size, padding the final iterable with null values if necessary. For example, partitioning an iterable containing [a, b, c, d, e] with a partition size of 3 yields [[a, b, c], [d, e, null]] -- an outer iterable containing two inner lists of three elements each, all in the original order.
Divides an iterable into unmodifiable sublists of the given size (the final iterable may be smaller). For example, partitioning an iterable containing [a, b, c, d, e] with a partition size of 3 yields [[a, b, c], [d, e]] -- an outer iterable containing two inner lists of three and two elements, all in the original order.
Removes, from an iterable, every element that belongs to the provided collection.
Removes, from an iterable, every element that does not belong to the provided collection.
Returns a view of this that skips its first numberToSkip elements. If this contains fewer than numberToSkip elements, the returned iterable skips all of its elements.
Transforms a MutableSetMultimap into its guava equivalent
Transforms a SetMultimap into its immutable guava equivalent
Transforms a Multimap into its immutable guava equivalent
Transforms a MutableMultimap into its guava equivalent
Returns a new ListMultimap filled with all elements of this multimap.
Returns a new MutableListMultimap filled with all elements of this multimap.
Returns a new MutableMultimap filled with all elements of this multimap.
Returns a new MutableSetMultimap filled with all elements of this multimap.
Returns a new SetMultimap filled with all elements of this multimap.
Returns a view containing the result of applying function to each element of this.
Returns a view containing the result of applying function to each element of fromIterable.
Returns an unmodifiable view of this.