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 Summary

      Constructors 
      Constructor Description
      SortedBuilder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PSet.Builder<I> add​(I value)  
      PSet.Builder<I> addAll​(java.util.Collection<I> items)  
      java.util.Set<I> build()
      Build the instance value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SortedBuilder

        public SortedBuilder()
    • 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.