MCPcopy
hub / github.com/google/guava / toSet

Method toSet

guava/src/com/google/common/collect/FluentIterable.java:651–654  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 10

delegateMethod · 0.45
delegateMethod · 0.45
rawTypesMethod · 0.45
delegateMethod · 0.45
getAllClassesMethod · 0.45
getTopLevelClassesMethod · 0.45
testToSetMethod · 0.45
testToSet_emptyMethod · 0.45

Calls 2

copyOfMethod · 0.95
getDelegateMethod · 0.95

Tested by 3

testToSetMethod · 0.36
testToSet_emptyMethod · 0.36