Uses of Interface
com.google.common.collect.Multimap
-
Packages that use Multimap Package Description com.google.common.collect This package contains generic collection interfaces and implementations, and other utilities for working with collections.com.google.common.collect.testing.google com.google.common.eventbus The EventBus allows publish-subscribe-style communication between components without requiring the components to explicitly register with one another (and thus be aware of each other).com.google.common.net This package contains utility methods and classes for working with net addresses (numeric IP and domain names).com.google.common.testing This package contains testing utilities. -
-
Uses of Multimap in com.google.common.collect
Subinterfaces of Multimap in com.google.common.collect Modifier and Type Interface Description (package private) interface
FilteredMultimap<K,V>
An interface for all filtered multimap types.(package private) interface
FilteredSetMultimap<K,V>
A supertype for filteredSetMultimap
implementations.interface
ListMultimap<K,V>
AMultimap
that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.interface
SetMultimap<K,V>
AMultimap
that cannot hold duplicate key-value pairs.interface
SortedSetMultimap<K,V>
ASetMultimap
whose set of values for a given key are kept sorted; that is, they comprise aSortedSet
.Classes in com.google.common.collect that implement Multimap Modifier and Type Class Description (package private) class
AbstractListMultimap<K,V>
Basic implementation of theListMultimap
interface.(package private) class
AbstractMapBasedMultimap<K,V>
Basic implementation of theMultimap
interface.(package private) class
AbstractMultimap<K,V>
A skeletonMultimap
implementation, not necessarily in terms of aMap
.(package private) class
AbstractSetMultimap<K,V>
Basic implementation of theSetMultimap
interface.(package private) class
AbstractSortedKeySortedSetMultimap<K,V>
Basic implementation of aSortedSetMultimap
with a sorted key set.(package private) class
AbstractSortedSetMultimap<K,V>
Basic implementation of theSortedSetMultimap
interface.class
ArrayListMultimap<K,V>
Implementation ofMultimap
that uses anArrayList
to store the values for a given key.(package private) class
ArrayListMultimapGwtSerializationDependencies<K,V>
A dummy superclass to support GWT serialization of the element types of anArrayListMultimap
.(package private) class
BaseImmutableMultimap<K,V>
A dummy superclass ofImmutableMultimap
that can be instanceof'd without ProGuard retaining additional implementation details ofImmutableMultimap
.(package private) class
EmptyImmutableListMultimap
Implementation ofImmutableListMultimap
with no entries.(package private) class
EmptyImmutableSetMultimap
Implementation ofImmutableListMultimap
with no entries.(package private) class
FilteredEntryMultimap<K,V>
Implementation ofMultimaps.filterEntries(Multimap, Predicate)
.(package private) class
FilteredEntrySetMultimap<K,V>
Implementation ofMultimaps.filterEntries(SetMultimap, Predicate)
.(package private) class
FilteredKeyListMultimap<K,V>
Implementation ofMultimaps.filterKeys(ListMultimap, Predicate)
.(package private) class
FilteredKeyMultimap<K,V>
Implementation ofMultimaps.filterKeys(Multimap, Predicate)
.(package private) class
FilteredKeySetMultimap<K,V>
Implementation ofMultimaps.filterKeys(SetMultimap, Predicate)
.class
ForwardingListMultimap<K,V>
A list multimap which forwards all its method calls to another list multimap.class
ForwardingMultimap<K,V>
A multimap which forwards all its method calls to another multimap.class
ForwardingSetMultimap<K,V>
A set multimap which forwards all its method calls to another set multimap.class
ForwardingSortedSetMultimap<K,V>
A sorted set multimap which forwards all its method calls to another sorted set multimap.class
HashMultimap<K,V>
Implementation ofMultimap
using hash tables.(package private) class
HashMultimapGwtSerializationDependencies<K,V>
A dummy superclass to support GWT serialization of the element types of aHashMultimap
.class
ImmutableListMultimap<K,V>
AListMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.class
ImmutableMultimap<K,V>
AMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.class
ImmutableSetMultimap<K,V>
ASetMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.class
LinkedHashMultimap<K,V>
Implementation ofMultimap
that 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.(package private) class
LinkedHashMultimapGwtSerializationDependencies<K,V>
A dummy superclass to support GWT serialization of the element types of aLinkedHashMultimap
.class
LinkedListMultimap<K,V>
An implementation ofListMultimap
that supports deterministic iteration order for both keys and values.private static class
Multimaps.CustomListMultimap<K,V>
private static class
Multimaps.CustomMultimap<K,V>
private static class
Multimaps.CustomSetMultimap<K,V>
private static class
Multimaps.CustomSortedSetMultimap<K,V>
private static class
Multimaps.MapMultimap<K,V>
private static class
Multimaps.TransformedEntriesListMultimap<K,V1,V2>
private static class
Multimaps.TransformedEntriesMultimap<K,V1,V2>
private static class
Multimaps.UnmodifiableListMultimap<K,V>
private static class
Multimaps.UnmodifiableMultimap<K,V>
private static class
Multimaps.UnmodifiableSetMultimap<K,V>
private static class
Multimaps.UnmodifiableSortedSetMultimap<K,V>
private static class
Synchronized.SynchronizedListMultimap<K,V>
private static class
Synchronized.SynchronizedMultimap<K,V>
private static class
Synchronized.SynchronizedSetMultimap<K,V>
private static class
Synchronized.SynchronizedSortedSetMultimap<K,V>
class
TreeMultimap<K,V>
Implementation ofMultimap
whose keys and values are ordered by their natural ordering or by supplied comparators.Fields in com.google.common.collect declared as Multimap Modifier and Type Field Description (package private) Multimap<K,V>
Multimaps.UnmodifiableMultimap. delegate
(package private) Multimap<K,V1>
Multimaps.TransformedEntriesMultimap. fromMultimap
private Multimap<K,V>
Multimaps.AsMap. multimap
(package private) Multimap<K,V>
Multimaps.Keys. multimap
(package private) Multimap<K,V>
FilteredEntryMultimap. unfiltered
(package private) Multimap<K,V>
FilteredKeyMultimap. unfiltered
Methods in com.google.common.collect with type parameters of type Multimap Modifier and Type Method Description (package private) static <T,K,V,M extends Multimap<K,V>>
java.util.stream.Collector<T,?,M>CollectCollectors. flatteningToMultimap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends V>> valueFunction, java.util.function.Supplier<M> multimapSupplier)
static <T,K,V,M extends Multimap<K,V>>
java.util.stream.Collector<T,?,M>Multimaps. flatteningToMultimap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends V>> valueFunction, java.util.function.Supplier<M> multimapSupplier)
Returns aCollector
accumulating entries into aMultimap
generated 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 insource
intodest
, with its key and value reversed.(package private) static <T,K,V,M extends Multimap<K,V>>
java.util.stream.Collector<T,?,M>CollectCollectors. toMultimap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction, java.util.function.Supplier<M> multimapSupplier)
static <T,K,V,M extends Multimap<K,V>>
java.util.stream.Collector<T,?,M>Multimaps. toMultimap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction, java.util.function.Supplier<M> multimapSupplier)
Returns aCollector
accumulating entries into aMultimap
generated from the specified supplier.Methods in com.google.common.collect that return Multimap Modifier and Type Method Description abstract <K extends K0,V extends V0>
Multimap<K,V>MultimapBuilder. build()
Returns a new, emptyMultimap
with the specified implementation.<K extends K0,V extends V0>
Multimap<K,V>MultimapBuilder. build(Multimap<? extends K,? extends V> multimap)
Returns aMultimap
with the specified implementation, initialized with the entries ofmultimap
.protected abstract Multimap<K,V>
ForwardingMultimap. delegate()
protected Multimap<K,V>
Multimaps.UnmodifiableMultimap. delegate()
(package private) Multimap<K,V>
Synchronized.SynchronizedMultimap. delegate()
static <K,V>
Multimap<K,V>Multimaps. filterEntries(Multimap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Returns a multimap containing the mappings inunfiltered
that satisfy a predicate.private static <K,V>
Multimap<K,V>Multimaps. filterFiltered(FilteredMultimap<K,V> multimap, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Support removal operations when filtering a filtered multimap.static <K,V>
Multimap<K,V>Multimaps. filterKeys(Multimap<K,V> unfiltered, Predicate<? super K> keyPredicate)
Returns a multimap containing the mappings inunfiltered
whose 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 inunfiltered
whose values satisfy a predicate.(package private) Multimap<K,V>
AbstractMultimap.Entries. multimap()
(package private) abstract Multimap<K,V>
Multimaps.Entries. multimap()
(package private) static <K,V>
Multimap<K,V>Synchronized. multimap(Multimap<K,V> multimap, java.lang.Object mutex)
static <K,V>
Multimap<K,V>Multimaps. newMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.Collection<V>> factory)
Creates a newMultimap
backed 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.Multimap<K,V>
FilteredEntryMultimap. unfiltered()
Multimap<K,V>
FilteredKeyMultimap. unfiltered()
Multimap<K,V>
FilteredMultimap. unfiltered()
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 Multimap Modifier and Type Method Description static <K,V>
java.util.Map<K,java.util.Collection<V>>Multimaps. asMap(Multimap<K,V> multimap)
Returnsmultimap.asMap()
.<K extends K0,V extends V0>
Multimap<K,V>MultimapBuilder. build(Multimap<? extends K,? extends V> multimap)
Returns aMultimap
with the specified implementation, initialized with the entries ofmultimap
.<K extends K0,V extends V0>
ListMultimap<K,V>MultimapBuilder.ListMultimapBuilder. build(Multimap<? extends K,? extends V> multimap)
<K extends K0,V extends V0>
SetMultimap<K,V>MultimapBuilder.SetMultimapBuilder. build(Multimap<? extends K,? extends V> multimap)
<K extends K0,V extends V0>
SortedSetMultimap<K,V>MultimapBuilder.SortedSetMultimapBuilder. build(Multimap<? extends K,? extends V> multimap)
static <K,V>
ImmutableListMultimap<K,V>ImmutableListMultimap. copyOf(Multimap<? extends K,? extends V> multimap)
Returns an immutable multimap containing the same mappings asmultimap
.static <K,V>
ImmutableMultimap<K,V>ImmutableMultimap. copyOf(Multimap<? extends K,? extends V> multimap)
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>ImmutableSetMultimap. copyOf(Multimap<? extends K,? extends V> multimap)
Returns an immutable set multimap containing the same mappings asmultimap
.private static <K,V>
ImmutableSetMultimap<K,V>ImmutableSetMultimap. copyOf(Multimap<? extends K,? extends V> multimap, java.util.Comparator<? super V> valueComparator)
static <K,V>
ArrayListMultimap<K,V>ArrayListMultimap. create(Multimap<? extends K,? extends V> multimap)
Constructs anArrayListMultimap
with the same mappings as the specified multimap.static <K,V>
HashMultimap<K,V>HashMultimap. create(Multimap<? extends K,? extends V> multimap)
Constructs aHashMultimap
with the same mappings as the specified multimap.static <K,V>
LinkedHashMultimap<K,V>LinkedHashMultimap. create(Multimap<? extends K,? extends V> multimap)
Constructs aLinkedHashMultimap
with the same mappings as the specified multimap.static <K,V>
LinkedListMultimap<K,V>LinkedListMultimap. create(Multimap<? extends K,? extends V> multimap)
Constructs aLinkedListMultimap
with the same mappings as the specifiedMultimap
.static <K extends java.lang.Comparable,V extends java.lang.Comparable>
TreeMultimap<K,V>TreeMultimap. create(Multimap<? extends K,? extends V> multimap)
Constructs aTreeMultimap
, ordered by the natural ordering of its keys and values, with the same mappings as the specified multimap.(package private) static boolean
Multimaps. equalsImpl(Multimap<?,?> multimap, java.lang.Object object)
static <K,V>
Multimap<K,V>Multimaps. filterEntries(Multimap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Returns a multimap containing the mappings inunfiltered
that 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 inunfiltered
whose 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 inunfiltered
whose 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 insource
intodest
, with its key and value reversed.(package private) static <K,V>
Multimap<K,V>Synchronized. multimap(Multimap<K,V> multimap, java.lang.Object mutex)
(package private) static <K,V>
voidSerialization. populateMultimap(Multimap<K,V> multimap, java.io.ObjectInputStream stream)
Populates a multimap by reading an input stream, as part of deserialization.(package private) static <K,V>
voidSerialization. populateMultimap(Multimap<K,V> multimap, java.io.ObjectInputStream stream, int distinctKeys)
Populates a multimap by reading an input stream, as part of deserialization.boolean
AbstractMultimap. putAll(Multimap<? extends K,? extends V> multimap)
boolean
ForwardingMultimap. putAll(Multimap<? extends K,? extends V> multimap)
ImmutableListMultimap.Builder<K,V>
ImmutableListMultimap.Builder. putAll(Multimap<? extends K,? extends V> multimap)
ImmutableMultimap.Builder<K,V>
ImmutableMultimap.Builder. putAll(Multimap<? extends K,? extends V> multimap)
Stores another multimap's entries in the built multimap.boolean
ImmutableMultimap. putAll(Multimap<? extends K,? extends V> multimap)
Deprecated.Unsupported operation.ImmutableSetMultimap.Builder<K,V>
ImmutableSetMultimap.Builder. putAll(Multimap<? extends K,? extends V> multimap)
boolean
Multimap. putAll(Multimap<? extends K,? extends V> multimap)
Stores all key-value pairs ofmultimap
in this multimap, in the order returned bymultimap.entries()
.boolean
Multimaps.MapMultimap. putAll(Multimap<? extends K,? extends V> multimap)
boolean
Multimaps.TransformedEntriesMultimap. putAll(Multimap<? extends K,? extends V2> multimap)
boolean
Multimaps.UnmodifiableMultimap. putAll(Multimap<? extends K,? extends V> multimap)
boolean
Synchronized.SynchronizedMultimap. putAll(Multimap<? extends K,? extends V> multimap)
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.(package private) static <K,V>
voidSerialization. writeMultimap(Multimap<K,V> multimap, java.io.ObjectOutputStream stream)
Stores the contents of a multimap in an output stream, as part of serialization.Constructors in com.google.common.collect with parameters of type Multimap Constructor Description ArrayListMultimap(Multimap<? extends K,? extends V> multimap)
AsMap(Multimap<K,V> multimap)
FilteredEntryMultimap(Multimap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> predicate)
FilteredKeyMultimap(Multimap<K,V> unfiltered, Predicate<? super K> keyPredicate)
HashMultimap(Multimap<? extends K,? extends V> multimap)
Keys(Multimap<K,V> multimap)
LinkedListMultimap(Multimap<? extends K,? extends V> multimap)
SynchronizedMultimap(Multimap<K,V> delegate, java.lang.Object mutex)
TransformedEntriesMultimap(Multimap<K,V1> fromMultimap, Maps.EntryTransformer<? super K,? super V1,V2> transformer)
TreeMultimap(java.util.Comparator<? super K> keyComparator, java.util.Comparator<? super V> valueComparator, Multimap<? extends K,? extends V> multimap)
UnmodifiableMultimap(Multimap<K,V> delegate)
-
Uses of Multimap in com.google.common.collect.testing.google
Classes in com.google.common.collect.testing.google with type parameters of type Multimap Modifier and Type Class Description class
AbstractMultimapTester<K,V,M extends Multimap<K,V>>
Superclass for allMultimap
testers.class
MultimapTestSuiteBuilder<K,V,M extends Multimap<K,V>>
Creates, based on your criteria, a JUnit test suite that exhaustively tests aMultimap
implementation.private static class
MultimapTestSuiteBuilder.AsMapGenerator<K,V,M extends Multimap<K,V>>
(package private) static class
MultimapTestSuiteBuilder.EntriesGenerator<K,V,M extends Multimap<K,V>>
(package private) static class
MultimapTestSuiteBuilder.KeysGenerator<K,V,M extends Multimap<K,V>>
(package private) static class
MultimapTestSuiteBuilder.MultimapAsMapGetGenerator<K,V,M extends Multimap<K,V>>
(package private) static class
MultimapTestSuiteBuilder.MultimapGetGenerator<K,V,M extends Multimap<K,V>>
private static class
MultimapTestSuiteBuilder.ReserializedMultimapGenerator<K,V,M extends Multimap<K,V>>
(package private) static class
MultimapTestSuiteBuilder.ValuesGenerator<K,V,M extends Multimap<K,V>>
interface
TestMultimapGenerator<K,V,M extends Multimap<K,V>>
Creates multimaps, containing sample elements, to be tested.Fields in com.google.common.collect.testing.google declared as Multimap Modifier and Type Field Description private M
AbstractMultimapTester. multimap
Fields in com.google.common.collect.testing.google with type parameters of type Multimap Modifier and Type Field Description private java.util.Set<Feature<? super Multimap>>
MultimapFeature. implied
Methods in com.google.common.collect.testing.google with type parameters of type Multimap Modifier and Type Method Description static <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 Multimap Modifier and Type Method Description protected Multimap<K,V>
AbstractMultimapTester. resetContainer(java.util.Map.Entry<K,V>... newContents)
Methods in com.google.common.collect.testing.google that return types with arguments of type Multimap Modifier and Type Method Description java.util.Set<Feature<? super Multimap>>
MultimapFeature. getImpliedFeatures()
Methods in com.google.common.collect.testing.google with parameters of type Multimap Modifier and Type Method Description (package private) static void
GoogleHelpers. assertEmpty(Multimap<?,?> multimap)
static <K,V>
voidUnmodifiableCollectionTests. assertMultimapIsUnmodifiable(Multimap<K,V> multimap, K sampleKey, V sampleValue)
Verifies that a multimap is immutable.private static <K,V>
voidUnmodifiableCollectionTests. assertMultimapRemainsUnmodified(Multimap<K,V> expected, java.util.List<java.util.Map.Entry<K,V>> actual)
-
Uses of Multimap in com.google.common.eventbus
Methods in com.google.common.eventbus that return Multimap Modifier and Type Method Description private Multimap<java.lang.Class<?>,Subscriber>
SubscriberRegistry. findAllSubscribers(java.lang.Object listener)
Returns all subscribers for the given listener grouped by the type of event they subscribe to. -
Uses of Multimap in com.google.common.net
Methods in com.google.common.net with parameters of type Multimap Modifier and Type Method Description private static MediaType
MediaType. create(java.lang.String type, java.lang.String subtype, Multimap<java.lang.String,java.lang.String> parameters)
MediaType
MediaType. withParameters(Multimap<java.lang.String,java.lang.String> parameters)
Replaces all parameters with the given parameters. -
Uses of Multimap in com.google.common.testing
Methods in com.google.common.testing that return Multimap Modifier and Type Method Description private static <K,V>
Multimap<K,V>FreshValueGenerator. generateMultimap(K key, V value)
-