K0 - The upper bound on the key type of the generated multimap.public abstract static class MultimapBuilder.MultimapBuilderWithKeys<K0>
extends java.lang.Object
MultimapBuilder in which the key-value collection map
implementation has been specified, but the value collection implementation has not.| Modifier and Type | Field and Description |
|---|---|
private static int |
DEFAULT_EXPECTED_VALUES_PER_KEY |
| Constructor and Description |
|---|
MultimapBuilderWithKeys() |
| Modifier and Type | Method and Description |
|---|---|
MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> |
arrayListValues()
Uses an
ArrayList to store value collections. |
MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> |
arrayListValues(int expectedValuesPerKey)
Uses an
ArrayList to store value collections, initialized to expect the specified
number of values per key. |
(package private) abstract <K extends K0,V> |
createMap() |
<V0 extends java.lang.Enum<V0>> |
enumSetValues(java.lang.Class<V0> valueClass)
Uses an
EnumSet to store value collections. |
MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> |
hashSetValues()
Uses a hash-based
Set to store value collections. |
MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> |
hashSetValues(int expectedValuesPerKey)
Uses a hash-based
Set to store value collections, initialized to expect the specified
number of values per key. |
MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> |
linkedHashSetValues()
Uses an insertion-ordered hash-based
Set to store value collections. |
MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> |
linkedHashSetValues(int expectedValuesPerKey)
Uses an insertion-ordered hash-based
Set to store value collections, initialized to
expect the specified number of values per key. |
MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> |
linkedListValues()
Uses a
LinkedList to store value collections. |
MultimapBuilder.SortedSetMultimapBuilder<K0,java.lang.Comparable> |
treeSetValues()
Uses a naturally-ordered
TreeSet to store value collections. |
<V0> MultimapBuilder.SortedSetMultimapBuilder<K0,V0> |
treeSetValues(java.util.Comparator<V0> comparator)
Uses a
TreeSet ordered by the specified comparator to store value collections. |
private static final int DEFAULT_EXPECTED_VALUES_PER_KEY
abstract <K extends K0,V> java.util.Map<K,java.util.Collection<V>> createMap()
public MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> arrayListValues()
ArrayList to store value collections.public MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> arrayListValues(int expectedValuesPerKey)
ArrayList to store value collections, initialized to expect the specified
number of values per key.java.lang.IllegalArgumentException - if expectedValuesPerKey < 0public MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> linkedListValues()
LinkedList to store value collections.public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> hashSetValues()
Set to store value collections.public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> hashSetValues(int expectedValuesPerKey)
Set to store value collections, initialized to expect the specified
number of values per key.java.lang.IllegalArgumentException - if expectedValuesPerKey < 0public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> linkedHashSetValues()
Set to store value collections.public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> linkedHashSetValues(int expectedValuesPerKey)
Set to store value collections, initialized to
expect the specified number of values per key.java.lang.IllegalArgumentException - if expectedValuesPerKey < 0public MultimapBuilder.SortedSetMultimapBuilder<K0,java.lang.Comparable> treeSetValues()
TreeSet to store value collections.public <V0> MultimapBuilder.SortedSetMultimapBuilder<K0,V0> treeSetValues(java.util.Comparator<V0> comparator)
TreeSet ordered by the specified comparator to store value collections.
Multimaps generated by the resulting builder will not be serializable if comparator is not serializable.
public <V0 extends java.lang.Enum<V0>> MultimapBuilder.SetMultimapBuilder<K0,V0> enumSetValues(java.lang.Class<V0> valueClass)
EnumSet to store value collections.