Class ImmutableSortedMultiset.Builder<E>

Enclosing class:
ImmutableSortedMultiset<E>

@Deprecated(since="2022-12-01") public static class ImmutableSortedMultiset.Builder<E> extends ImmutableMultiset.Builder<E>
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 multiset instances, especially public static final multisets ("constant multisets"). Example:
 

    public static final ImmutableSortedMultiset<Bean> BEANS =
        new ImmutableSortedMultiset.Builder<Bean>()
            .addCopies(Bean.COCOA, 4)
            .addCopies(Bean.GARDEN, 6)
            .addCopies(Bean.RED, 8)
            .addCopies(Bean.BLACK_EYED, 10)
            .build();

Builder instances can be reused; it is safe to call build() multiple times to build multiple multisets in series.

Since:
12.0