mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 11:18:16 +07:00
16 lines
394 B
Java
16 lines
394 B
Java
// "Replace with toArray" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public List<?>[] testToArray(List<String> data) {
|
|
Set<List<String>> result = new LinkedHashSet<>();
|
|
for (String str : dat<caret>a) {
|
|
if (!str.isEmpty()) {
|
|
List<String> list = Collections.singletonList(str);
|
|
result.add(list);
|
|
}
|
|
}
|
|
return result.toArray(new List<?>[0]);
|
|
}
|
|
} |