mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
28 lines
721 B
Java
28 lines
721 B
Java
// "Replace with lambda" "true-preview"
|
|
|
|
import java.util.*;
|
|
import java.util.function.Function;
|
|
|
|
import static java.util.Collections.emptyList;
|
|
|
|
class Ambiguous {
|
|
public void setRoots(List<String> roots) {}
|
|
|
|
public static <T> List<T> concat(Iterable<? extends Collection<T>> list) {
|
|
return new ArrayList<T>();
|
|
}
|
|
|
|
public static <T> List<T> concat(List<List<? extends T>> lists) {
|
|
return new ArrayList<T>();
|
|
}
|
|
|
|
public static <T,V> List<V> map(Collection<? extends T> iterable, Function<T, V> mapping) {
|
|
return emptyList();
|
|
}
|
|
|
|
public void anonymousToLambda(HashSet<String> modules) {
|
|
setRoots(Ambiguous.concat(Ambiguous.map(modules, (Function<String, List<String>>) s -> null)
|
|
));
|
|
}
|
|
|
|
} |