mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 11:47:50 +07:00
12 lines
311 B
Java
12 lines
311 B
Java
// "Replace with collect" "true"
|
|
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Main {
|
|
public Set<String> test(String[] array) {
|
|
/*initial count*/
|
|
Set<String> set = Arrays.stream(array).filter(Objects::nonNull).limit(10).collect(Collectors.toSet());
|
|
return set;
|
|
}
|
|
} |