Class MultimapBuilder.MultimapBuilderWithKeys<K0>
java.lang.Object
com.google.common.collect.MultimapBuilder.MultimapBuilderWithKeys<K0>
- Type Parameters:
K0- The upper bound on the key type of the generated multimap.
- Enclosing class:
MultimapBuilder<K0,V0>
An intermediate stage in a
MultimapBuilder in which the key-value collection map
implementation has been specified, but the value collection implementation has not.- Since:
- 16.0
-
Method Summary
Modifier and TypeMethodDescriptionUses anArrayListto store value collections.arrayListValues(int expectedValuesPerKey) Uses anArrayListto store value collections, initialized to expect the specified number of values per key.<V0 extends Enum<V0>>
MultimapBuilder.SetMultimapBuilder<K0, V0> enumSetValues(Class<V0> valueClass) Uses anEnumSetto store value collections.Uses aHashSetto store value collections.hashSetValues(int expectedValuesPerKey) Uses aHashSetto store value collections, initialized to expect the specified number of values per key.Uses aLinkedHashSetto store value collections.linkedHashSetValues(int expectedValuesPerKey) Uses aLinkedHashSetto store value collections, initialized to expect the specified number of values per key.Uses aLinkedListto store value collections.Uses a naturally-orderedTreeSetto store value collections.treeSetValues(Comparator<V0> comparator) Uses aTreeSetordered by the specified comparator to store value collections.
-
Method Details
-
arrayListValues
Uses anArrayListto store value collections. -
arrayListValues
Uses anArrayListto store value collections, initialized to expect the specified number of values per key.- Throws:
IllegalArgumentException- ifexpectedValuesPerKey < 0
-
linkedListValues
Uses aLinkedListto store value collections. -
hashSetValues
Uses aHashSetto store value collections. -
hashSetValues
Uses aHashSetto store value collections, initialized to expect the specified number of values per key.- Throws:
IllegalArgumentException- ifexpectedValuesPerKey < 0
-
linkedHashSetValues
Uses aLinkedHashSetto store value collections. -
linkedHashSetValues
Uses aLinkedHashSetto store value collections, initialized to expect the specified number of values per key.- Throws:
IllegalArgumentException- ifexpectedValuesPerKey < 0
-
treeSetValues
Uses a naturally-orderedTreeSetto store value collections. -
treeSetValues
public <V0> MultimapBuilder.SortedSetMultimapBuilder<K0,V0> treeSetValues(Comparator<V0> comparator) Uses aTreeSetordered by the specified comparator to store value collections.Multimaps generated by the resulting builder will not be serializable if
comparatoris not serializable. -
enumSetValues
public <V0 extends Enum<V0>> MultimapBuilder.SetMultimapBuilder<K0,V0> enumSetValues(Class<V0> valueClass) Uses anEnumSetto store value collections.
-