mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-19 10:20:56 +07:00
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)));
|
|
}
|
|
}
|