- Type Parameters:
T- 参数1的类型U- 参数2的类型R- 返回值类型
- All Superinterfaces:
BiFunction<T,,U, R> Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
可序列化的BiFunction接口,支持异常抛出和函数组合。
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
applying
对给定两个参数应用此函数,可能抛出异常。- Parameters:
t- 第一个函数参数u- 第二个函数参数- Returns:
- 函数执行结果
- Throws:
Throwable- 可能抛出的异常
-
apply
对给定两个参数应用此函数,自动处理异常。- Specified by:
applyin interfaceBiFunction<T,U, R> - Parameters:
t- 第一个函数参数u- 第二个函数参数- Returns:
- 函数执行结果
- Throws:
RuntimeException- 包装后的运行时异常
-
andThen
返回一个组合函数,先应用此函数,再将结果传递给after函数。- Type Parameters:
V- after函数输出类型及组合函数的输出类型- Parameters:
after- 在此函数应用后执行的函数- Returns:
- 组合函数,先应用此函数再应用after函数
- Throws:
NullPointerException- 如果after为null
-