mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-01 12:50:56 +07:00
20 lines
380 B
Java
20 lines
380 B
Java
class Tmp
|
|
{
|
|
interface Function<T, R> {
|
|
|
|
R apply(T t);
|
|
}
|
|
interface Foo<T>
|
|
{
|
|
<R> Foo<R> map1(Function<T,R> f);
|
|
|
|
<R> Foo<R> map2(Function<? super T, ? extends R> f);
|
|
}
|
|
|
|
public static void main(String[] args)
|
|
{
|
|
Foo<Object> x = null;
|
|
Foo<Object> y1 = x.map1(i -> "");
|
|
Foo<Object> y2 = x.map2(i -> "");
|
|
}
|
|
} |