Class ImmutableSetMultimap.Builder<K,​V>

  • Enclosing class:
    ImmutableSetMultimap<K,​V>

    @Deprecated(since="2022-12-01")
    public static final class ImmutableSetMultimap.Builder<K,​V>
    extends ImmutableMultimap.Builder<K,​V>
    Deprecated.
    The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
    A builder for creating immutable SetMultimap instances, especially public static final multimaps ("constant multimaps"). Example:
       
    
        static final Multimap<String, Integer> STRING_TO_INTEGER_MULTIMAP =
            new ImmutableSetMultimap.Builder<String, Integer>()
                .put("one", 1)
                .putAll("several", 1, 2, 3)
                .putAll("many", 1, 2, 3, 4, 5)
                .build();

    Builder instances can be reused; it is safe to call build() multiple times to build multiple multimaps in series. Each multimap contains the key-value mappings in the previously created multimaps.

    Since:
    2.0 (imported from Google Collections Library)