List Multimap
A Multimap that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.
See the Multimap documentation for information common to all multimaps.
The get and asMap methods return a List of values.
Methods in this interface support only read-only access to the multimap; read-write access is supported through the MutableListMultimap interface.
See the Guava User Guide article on Multimap.
See also
Parameters
the type of multimap keys. The multimap is invariant in its key type, as it can accept key as a parameter (of containsKey for example) and return it in keys set.
the type of multimap values. The multimap is covariant 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.
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.
Inheritors
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 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.
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.
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.