mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 11:18:16 +07:00
25 lines
647 B
Java
25 lines
647 B
Java
// "Replace with collect" "true"
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
|
|
public List<String> test(Map<String, List<String>> map) {
|
|
List<String> result = new ArrayList<>();
|
|
for(Map.Entry<String, List<String>> entry : map.en<caret>trySet()) {
|
|
if(entry.getKey().isEmpty()) continue;
|
|
else {
|
|
List<String> list = entry.getValue();
|
|
if (list == null) continue;
|
|
for (String str : list) {
|
|
String trimmed = str.trim();
|
|
if (trimmed.isEmpty()) continue;
|
|
else result.add(trimmed);
|
|
}
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
} |