public static <T> Collector<T, ?, ImmutableSet<T>> toImmutableSet() {
    return collectingAndThen(toList(), ImmutableSet::copyOf);
  }
Returns a collector for an {@link ImmutableSet}.
common/src/main/java/com/google/auto/common/MoreStreams.java