Class PSet.SortedBuilder<I extends java.lang.Comparable<I>>

  • Type Parameters:
    I - The item type.
    All Implemented Interfaces:
    PSet.Builder<I>, PBuilder<java.util.Set<I>>
    Enclosing class:
    PSet<Item>

    public static class PSet.SortedBuilder<I extends java.lang.Comparable<I>>
    extends java.lang.Object
    implements PSet.Builder<I>
    Default builder returning an ImmutableSortedSet.
    • Constructor Detail

      • SortedBuilder

        public SortedBuilder()
      • SortedBuilder

        public SortedBuilder​(int capacity)
    • Method Detail

      • addAll

        @Nonnull
        public PSet.Builder<I> addAll​(@Nonnull
                                      java.util.Collection<I> items)
        Specified by:
        addAll in interface PSet.Builder<I extends java.lang.Comparable<I>>
      • build

        @Nonnull
        public java.util.Set<I> build()
        Description copied from interface: PBuilder
        Build the instance value.
        Specified by:
        build in interface PBuilder<I extends java.lang.Comparable<I>>
        Specified by:
        build in interface PSet.Builder<I extends java.lang.Comparable<I>>
        Returns:
        The instance value.