com.google.common.collect

## 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>

      public abstract static class MultimapBuilder.MultimapBuilderWithKeys<K0>
      extends java.lang.Object

  An intermediate stage in a `MultimapBuilder` in which the key-value collection map implementation has been specified, but the value collection implementation has not.

- - ### Method Summary

    Methods
    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.
    `<V0 extends java.lang.Enum<V0>> MultimapBuilder.SetMultimapBuilder<K0,V0>` | `enumSetValues(java.lang.Class<V0> valueClass)` Uses an `EnumSet` to store value collections.
    `MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object>` | `hashSetValues()` Uses a `HashSet` to store value collections.
    `MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object>` | `hashSetValues(int expectedValuesPerKey)` Uses a `HashSet` to store value collections, initialized to expect the specified number of values per key.
    `MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object>` | `linkedHashSetValues()` Uses a `LinkedHashSet` to store value collections.
    `MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object>` | `linkedHashSetValues(int expectedValuesPerKey)` Uses a `LinkedHashSet` 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### arrayListValues

          public MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> arrayListValues()

      Uses an `ArrayList` to store value collections.

    - #### arrayListValues

          public 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.
      Throws:
        `java.lang.IllegalArgumentException` - if `expectedValuesPerKey < 0`

    - #### linkedListValues

          public MultimapBuilder.ListMultimapBuilder<K0,java.lang.Object> linkedListValues()

      Uses a `LinkedList` to store value collections.

    - #### hashSetValues

          public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> hashSetValues()

      Uses a `HashSet` to store value collections.

    - #### hashSetValues

          public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> hashSetValues(int expectedValuesPerKey)

      Uses a `HashSet` to store value collections, initialized to expect the specified number of values per key.
      Throws:
        `java.lang.IllegalArgumentException` - if `expectedValuesPerKey < 0`

    - #### linkedHashSetValues

          public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> linkedHashSetValues()

      Uses a `LinkedHashSet` to store value collections.

    - #### linkedHashSetValues

          public MultimapBuilder.SetMultimapBuilder<K0,java.lang.Object> linkedHashSetValues(int expectedValuesPerKey)

      Uses a `LinkedHashSet` to store value collections, initialized to expect the specified number of values per key.
      Throws:
        `java.lang.IllegalArgumentException` - if `expectedValuesPerKey < 0`

    - #### treeSetValues

          public MultimapBuilder.SortedSetMultimapBuilder<K0,java.lang.Comparable> treeSetValues()

      Uses a naturally-ordered `TreeSet` to store value collections.

    - #### treeSetValues

          public <V0> MultimapBuilder.SortedSetMultimapBuilder<K0,V0> treeSetValues(java.util.Comparator<V0> comparator)

      Uses a `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.

    - #### enumSetValues

          public <V0 extends java.lang.Enum<V0>> MultimapBuilder.SetMultimapBuilder<K0,V0> enumSetValues(java.lang.Class<V0> valueClass)

      Uses an `EnumSet` to store value collections.