mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
18 lines
355 B
Java
18 lines
355 B
Java
|
|
import java.util.concurrent.Callable;
|
|
|
|
class Test {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
Runnable iteration = compute(() -> {
|
|
if (true) return () -> {};
|
|
return null;
|
|
});
|
|
Runnable iteration2 = compute(() -> () -> {});
|
|
}
|
|
|
|
static <T> T compute(Callable<T> c) throws Exception {
|
|
return c.call();
|
|
}
|
|
}
|