mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
18 lines
336 B
Java
18 lines
336 B
Java
class Test {
|
|
public static final BinaryOperator<Integer> rPlus = (x, y) -> x + y;
|
|
interface BinaryOperator<T> extends Combiner<T,T,T> {
|
|
public T operate(T left, T right);
|
|
|
|
@Override
|
|
T combine(T t1, T t2) default {
|
|
return operate(t1, t2);
|
|
}
|
|
}
|
|
|
|
interface Combiner<T, U, V> {
|
|
V combine(T t, U u);
|
|
}
|
|
}
|
|
|
|
|