mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 02:24:00 +07:00
GitOrigin-RevId: 6b6405ee4491ad1d58947547c40df6fb2d291ab7
13 lines
396 B
Java
13 lines
396 B
Java
// "Fuse ArrayList into the Stream API chain" "true-preview"
|
|
import java.util.ArrayList;
|
|
import java.util.LinkedHashSet;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Test {
|
|
void test(Stream<String> stream) {
|
|
List<Object> objects = new ArrayList<>(stream.co<caret>llect(Collectors.toCollection(LinkedHashSet<Object>::new)));
|
|
}
|
|
}
|