mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
13 lines
371 B
Java
13 lines
371 B
Java
class Test<A,B> {
|
|
public static <P,Q> Test<P,Q> left(P p) { return null; }
|
|
public static <P,Q> Test<P,Q> right(Q q) { return null; }
|
|
public <C> C either(Function<A, C> leftFn, Function<B, C> rightFn){ return null; }
|
|
public Test<B,A> swap() {
|
|
return either(Test::<B,A>right, Test::<B,A>left);
|
|
}
|
|
}
|
|
|
|
interface Function<T, R> {
|
|
R fun(T t);
|
|
}
|