java.lang.Object
com.google.common.collect.MultimapBuilder<K0,V0>
com.google.common.collect.MultimapBuilder.SetMultimapBuilder<K0,V0>
- Direct Known Subclasses:
MultimapBuilder.SortedSetMultimapBuilder
public abstract static class MultimapBuilder.SetMultimapBuilder<K0 extends @Nullable Object, V0 extends @Nullable Object>
extends MultimapBuilder<K0,V0>
A specialization of
MultimapBuilder that generates SetMultimap instances.- Since:
- 16.0
- Author:
- Louis Wasserman
-
Nested Class Summary
Nested classes/interfaces inherited from class MultimapBuilder
MultimapBuilder.ListMultimapBuilder<K0,V0>, MultimapBuilder.MultimapBuilderWithKeys<K0>, MultimapBuilder.SetMultimapBuilder<K0, V0>, MultimapBuilder.SortedSetMultimapBuilder<K0, V0> Modifier and TypeClassDescriptionstatic classA specialization ofMultimapBuilderthat generatesListMultimapinstances.static classAn intermediate stage in aMultimapBuilderin which the key-value collection map implementation has been specified, but the value collection implementation has not.static classA specialization ofMultimapBuilderthat generatesSetMultimapinstances.static classA specialization ofMultimapBuilderthat generatesSortedSetMultimapinstances. -
Method Summary
Modifier and TypeMethodDescriptionabstract <K extends K0, V extends V0>
SetMultimap<K, V> build()Returns a new, emptyMultimapwith the specified implementation.<K extends K0, V extends V0>
SetMultimap<K, V> Returns aMultimapwith the specified implementation, initialized with the entries ofmultimap.Methods inherited from class MultimapBuilder
enumKeys, hashKeys, hashKeys, linkedHashKeys, linkedHashKeys, treeKeys, treeKeysModifier and TypeMethodDescriptionstatic <K0 extends Enum<K0>>
MultimapBuilder.MultimapBuilderWithKeys<K0> Uses anEnumMapto map keys to value collections.hashKeys()Uses a hash table to map keys to value collections.hashKeys(int expectedKeys) Uses a hash table to map keys to value collections, initialized to expect the specified number of keys.Uses a hash table to map keys to value collections.linkedHashKeys(int expectedKeys) Uses an hash table to map keys to value collections, initialized to expect the specified number of keys.treeKeys()Uses a naturally-orderedTreeMapto map keys to value collections.static <K0 extends @Nullable Object>
MultimapBuilder.MultimapBuilderWithKeys<K0> treeKeys(Comparator<K0> comparator) Uses aTreeMapsorted by the specified comparator to map keys to value collections.
-
Method Details
-
build
Description copied from class:MultimapBuilderReturns a new, emptyMultimapwith the specified implementation. -
build
public <K extends K0, V extends V0> SetMultimap<K,V> build(Multimap<? extends K, ? extends V> multimap) Description copied from class:MultimapBuilderReturns aMultimapwith the specified implementation, initialized with the entries ofmultimap.
-