/**
  * Returns a newly-created {@code ImmutableSortedSet} based on the contents of the {@code
  * Builder} and its comparator.
  */
 @Override
 public ImmutableSortedSet<E> build() {
   @SuppressWarnings("unchecked") // we're careful to put only E's in here
   E[] contentsArray = (E[]) contents;
   ImmutableSortedSet<E> result = construct(comparator, size, contentsArray);
   this.size = result.size(); // we eliminated duplicates in-place in contentsArray
   return result;
 }