[jOOQ/jOOQ#12530] Let Function1 <: Function and Function2 <: BiFunction

This commit is contained in:
Lukas Eder 2021-10-15 16:28:15 +02:00
parent 08e4f0af42
commit fd768e310a
2 changed files with 8 additions and 2 deletions

View File

@ -37,6 +37,8 @@
*/
package org.jooq;
import java.util.function.Function;
/**
* A function of degree 1.
* <p>
@ -47,10 +49,11 @@ package org.jooq;
*/
@Internal
@FunctionalInterface
public interface Function1<T1, R> {
public interface Function1<T1, R> extends Function<T1, R> {
/**
* Applies this function to the given arguments.
*/
@Override
R apply(T1 t1);
}

View File

@ -37,6 +37,8 @@
*/
package org.jooq;
import java.util.function.BiFunction;
/**
* A function of degree 2.
* <p>
@ -47,10 +49,11 @@ package org.jooq;
*/
@Internal
@FunctionalInterface
public interface Function2<T1, T2, R> {
public interface Function2<T1, T2, R> extends BiFunction<T1, T2, R> {
/**
* Applies this function to the given arguments.
*/
@Override
R apply(T1 t1, T2 t2);
}