// "Fuse newHashSet into the Stream API chain" "true-preview" package com.google.common.collect; import java.util.*; import java.util.stream.*; class X { void foo(Stream s) { Set set = Sets.newHashSet(s.collect(Collectors.toSet())); } } class Sets { public static native HashSet newHashSet(Iterable var0); }