Uses of Interface
com.google.common.collect.Multimap
Packages that use Multimap
Package
Description
This package contains generic collection interfaces and implementations, and other utilities for
working with collections.
This package contains utility methods and classes for working with net addresses (numeric IP and
domain names).
-
Uses of Multimap in com.google.common.collect
Subinterfaces of Multimap in com.google.common.collectModifier and TypeInterfaceDescriptioninterfaceListMultimap<K,V> AMultimapthat can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.interfaceSetMultimap<K,V> AMultimapthat cannot hold duplicate key-value pairs.interfaceSortedSetMultimap<K,V> ASetMultimapwhose set of values for a given key are kept sorted; that is, they comprise aSortedSet.Classes in com.google.common.collect that implement MultimapModifier and TypeClassDescriptionfinal classArrayListMultimap<K,V> Implementation ofMultimapthat uses anArrayListto store the values for a given key.classA list multimap which forwards all its method calls to another list multimap.classForwardingMultimap<K,V> A multimap which forwards all its method calls to another multimap.classA set multimap which forwards all its method calls to another set multimap.classA sorted set multimap which forwards all its method calls to another sorted set multimap.final classHashMultimap<K,V> Implementation ofMultimapusing hash tables.classAListMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.classImmutableMultimap<K,V> AMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.classImmutableSetMultimap<K,V> ASetMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.final classLinkedHashMultimap<K,V> Implementation ofMultimapthat does not allow duplicate key-value entries and that returns collections whose iterators follow the ordering in which the data was added to the multimap.classLinkedListMultimap<K,V> An implementation ofListMultimapthat supports deterministic iteration order for both keys and values.classTreeMultimap<K,V> Implementation ofMultimapwhose keys and values are ordered by their natural ordering or by supplied comparators.Methods in com.google.common.collect with type parameters of type MultimapModifier and TypeMethodDescriptionMultimaps.flatteningToMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valueFunction, Supplier<M> multimapSupplier) Returns aCollectoraccumulating entries into aMultimapgenerated from the specified supplier.static <K,V, M extends Multimap<K, V>>
MMultimaps.invertFrom(Multimap<? extends V, ? extends K> source, M dest) Copies each key-value mapping insourceintodest, with its key and value reversed.Multimaps.toMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, Supplier<M> multimapSupplier) Returns aCollectoraccumulating entries into aMultimapgenerated from the specified supplier.Methods in com.google.common.collect that return MultimapModifier and TypeMethodDescriptionMultimapBuilder.build()Returns a new, emptyMultimapwith the specified implementation.Returns aMultimapwith the specified implementation, initialized with the entries ofmultimap.ForwardingMultimap.delegate()static <K,V> Multimap<K, V> Multimaps.filterEntries(Multimap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a multimap containing the mappings inunfilteredthat satisfy a predicate.static <K,V> Multimap<K, V> Multimaps.filterKeys(Multimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfilteredwhose keys satisfy a predicate.static <K,V> Multimap<K, V> Multimaps.filterValues(Multimap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a multimap containing the mappings inunfilteredwhose values satisfy a predicate.static <K,V> Multimap<K, V> Multimaps.newMultimap(Map<K, Collection<V>> map, Supplier<? extends Collection<V>> factory) Creates a newMultimapbacked bymap, whose internal value collections are generated byfactory.static <K,V> Multimap<K, V> Multimaps.synchronizedMultimap(Multimap<K, V> multimap) Returns a synchronized (thread-safe) multimap backed by the specified multimap.static <K,V1, V2> Multimap<K, V2> Multimaps.transformEntries(Multimap<K, V1> fromMap, Maps.EntryTransformer<? super K, ? super V1, V2> transformer) Returns a view of a multimap whose values are derived from the original multimap's entries.static <K,V1, V2> Multimap<K, V2> Multimaps.transformValues(Multimap<K, V1> fromMultimap, Function<? super V1, V2> function) Returns a view of a multimap where each value is transformed by a function.static <K,V> Multimap<K, V> Multimaps.unmodifiableMultimap(ImmutableMultimap<K, V> delegate) Deprecated.no need to use thisstatic <K,V> Multimap<K, V> Multimaps.unmodifiableMultimap(Multimap<K, V> delegate) Returns an unmodifiable view of the specified multimap.Methods in com.google.common.collect with parameters of type MultimapModifier and TypeMethodDescriptionstatic <K,V> Map<K, Collection<V>> Returnsmultimap.asMap().Returns aMultimapwith the specified implementation, initialized with the entries ofmultimap.<K extends K0,V extends V0>
ListMultimap<K,V> <K extends K0,V extends V0>
SetMultimap<K,V> <K extends K0,V extends V0>
SortedSetMultimap<K,V> static <K,V> ImmutableListMultimap<K, V> Returns an immutable multimap containing the same mappings asmultimap.static <K,V> ImmutableMultimap<K, V> Returns an immutable multimap containing the same mappings asmultimap, in the "key-grouped" iteration order described in the class documentation.static <K,V> ImmutableSetMultimap<K, V> Returns an immutable set multimap containing the same mappings asmultimap.static <K,V> ArrayListMultimap<K, V> Constructs anArrayListMultimapwith the same mappings as the specified multimap.static <K,V> HashMultimap<K, V> Constructs aHashMultimapwith the same mappings as the specified multimap.static <K,V> LinkedHashMultimap<K, V> Constructs aLinkedHashMultimapwith the same mappings as the specified multimap.static <K,V> LinkedListMultimap<K, V> Constructs aLinkedListMultimapwith the same mappings as the specifiedMultimap.static <K extends Comparable,V extends Comparable>
TreeMultimap<K,V> Constructs aTreeMultimap, ordered by the natural ordering of its keys and values, with the same mappings as the specified multimap.static <K,V> Multimap<K, V> Multimaps.filterEntries(Multimap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a multimap containing the mappings inunfilteredthat satisfy a predicate.static <K,V> Multimap<K, V> Multimaps.filterKeys(Multimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfilteredwhose keys satisfy a predicate.static <K,V> Multimap<K, V> Multimaps.filterValues(Multimap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a multimap containing the mappings inunfilteredwhose values satisfy a predicate.static <K,V, M extends Multimap<K, V>>
MMultimaps.invertFrom(Multimap<? extends V, ? extends K> source, M dest) Copies each key-value mapping insourceintodest, with its key and value reversed.booleanStores another multimap's entries in the built multimap.final booleanDeprecated.Unsupported operation.booleanStores all key-value pairs ofmultimapin this multimap, in the order returned bymultimap.entries().static <K,V> Multimap<K, V> Multimaps.synchronizedMultimap(Multimap<K, V> multimap) Returns a synchronized (thread-safe) multimap backed by the specified multimap.static <K,V1, V2> Multimap<K, V2> Multimaps.transformEntries(Multimap<K, V1> fromMap, Maps.EntryTransformer<? super K, ? super V1, V2> transformer) Returns a view of a multimap whose values are derived from the original multimap's entries.static <K,V1, V2> Multimap<K, V2> Multimaps.transformValues(Multimap<K, V1> fromMultimap, Function<? super V1, V2> function) Returns a view of a multimap where each value is transformed by a function.static <K,V> Multimap<K, V> Multimaps.unmodifiableMultimap(Multimap<K, V> delegate) Returns an unmodifiable view of the specified multimap. -
Uses of Multimap in com.google.common.collect.testing.google
Classes in com.google.common.collect.testing.google with type parameters of type MultimapModifier and TypeClassDescriptionclassAbstractMultimapTester<K,V, M extends Multimap<K, V>> Superclass for allMultimaptesters.classMultimapTestSuiteBuilder<K,V, M extends Multimap<K, V>> Creates, based on your criteria, a JUnit test suite that exhaustively tests aMultimapimplementation.interfaceTestMultimapGenerator<K,V, M extends Multimap<K, V>> Creates multimaps, containing sample elements, to be tested.Methods in com.google.common.collect.testing.google with type parameters of type MultimapModifier and TypeMethodDescriptionstatic <K,V, M extends Multimap<K, V>>
MultimapTestSuiteBuilder<K,V, M> MultimapTestSuiteBuilder.using(TestMultimapGenerator<K, V, M> generator) Methods in com.google.common.collect.testing.google that return MultimapModifier and TypeMethodDescriptionAbstractMultimapTester.resetContainer(Map.Entry<K, V>... newContents) Methods in com.google.common.collect.testing.google that return types with arguments of type MultimapMethods in com.google.common.collect.testing.google with parameters of type MultimapModifier and TypeMethodDescriptionstatic <K,V> void UnmodifiableCollectionTests.assertMultimapIsUnmodifiable(Multimap<K, V> multimap, K sampleKey, V sampleValue) Verifies that a multimap is immutable. -
Uses of Multimap in com.google.common.net
Methods in com.google.common.net with parameters of type MultimapModifier and TypeMethodDescriptionMediaType.withParameters(Multimap<String, String> parameters) Replaces all parameters with the given parameters.