mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-15 11:18:23 +07:00
481bc252f3
(cherry picked from commit d2cbf3f2833104c3a0381059b0d6ef8ac0b3c94c)
13 lines
378 B
Java
13 lines
378 B
Java
public 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);
|
|
}
|