mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
23 lines
604 B
Java
23 lines
604 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;
|
|
List<String> list = entry.getValue();
|
|
if(list == null) continue;
|
|
for(String str : list) {
|
|
String trimmed = str.trim();
|
|
if(trimmed.isEmpty()) continue;
|
|
result.add(trimmed);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
} |