mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 20:07:01 +07:00
1. Code sample in description 2. Supported toCollection with parameterized method-reference
13 lines
343 B
Java
13 lines
343 B
Java
// "Fuse ArrayList into the Stream API chain" "true"
|
|
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 = stream.distinct().collect(Collectors.toList());
|
|
}
|
|
}
|