Returns an {@code ImmutableSet} containing all of the elements from this fluent iterable with duplicates removed. <p><b>{@code Stream} equivalent:</b> pass {@link ImmutableSet#toImmutableSet} to {@code stream.collect()}. @throws NullPointerException if any element is {@code null} @since 14.0 (sinc
()
| 649 | * @since 14.0 (since 12.0 as {@code toImmutableSet()}). |
| 650 | */ |
| 651 | @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. |
| 652 | public final ImmutableSet<@NonNull E> toSet() { |
| 653 | return ImmutableSet.copyOf((Iterable<@NonNull E>) getDelegate()); |
| 654 | } |
| 655 | |
| 656 | /** |
| 657 | * Returns an {@code ImmutableSortedSet} containing all of the elements from this {@code |