mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 19:58:23 +07:00
18 lines
438 B
Java
18 lines
438 B
Java
// "Replace with toArray" "true"
|
|
package com.google.common.collect;
|
|
|
|
import java.util.*;
|
|
import java.util.stream.Stream;
|
|
|
|
class Sets {
|
|
public static <E extends Comparable> TreeSet<E> newTreeSet() {
|
|
return new TreeSet<E>();
|
|
}
|
|
}
|
|
|
|
public class Test {
|
|
public String[] test(List<String> input) {
|
|
return input.stream().filter(Objects::nonNull).flatMap(s -> Stream.of(s, s + s)).distinct().sorted().toArray(String[]::new);
|
|
}
|
|
}
|