Class ImmutableSortedSet.Builder<E>

  • Enclosing class:

    public static final class ImmutableSortedSet.Builder<E>
    extends ImmutableSet.Builder<E>
    A builder for creating immutable sorted set instances, especially public static final sets ("constant sets"), with a given comparator. Example:
     public static final ImmutableSortedSet<Number> LUCKY_NUMBERS =
         new ImmutableSortedSet.Builder<Number>(ODDS_FIRST_COMPARATOR)

    Builder instances can be reused; it is safe to call build() multiple times to build multiple sets in series. Each set is a superset of the set created before it.