Interface XBiFunction<T,U,R>

Type Parameters:
T - 第一个参数的类型
U - 第二个参数的类型
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.

@FunctionalInterface public interface XBiFunction<T,U,R> extends BiFunction<T,U,R>, Serializable
接受两个参数并产生结果的函数
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    default <V> XBiFunction<T,U,V>
    andThen(XFunction<? super R,? extends V> after)
    返回一个复合函数,该函数首先将该函数应用于其输入,然后将after函数应用于结果。 如果任意一个函数的求值引发异常,则将其传递给组合函数的调用方
    default R
    apply(T t, U u)
    将此函数应用于给定的参数
    applying(T t, U u)
    将此函数应用于给定的参数

    Methods inherited from interface java.util.function.BiFunction

    andThen
  • Method Details

    • applying

      R applying(T t, U u) throws Exception
      将此函数应用于给定的参数
      Parameters:
      t - 参数1类型
      u - 参数2类型
      Returns:
      函数的结果
      Throws:
      Exception - 包裹已检查的异常
    • apply

      default R apply(T t, U u)
      将此函数应用于给定的参数
      Specified by:
      apply in interface BiFunction<T,U,R>
      Parameters:
      t - 参数1类型
      u - 参数2类型
      Returns:
      函数的结果
    • andThen

      default <V> XBiFunction<T,U,V> andThen(XFunction<? super R,? extends V> after)
      返回一个复合函数,该函数首先将该函数应用于其输入,然后将after函数应用于结果。 如果任意一个函数的求值引发异常,则将其传递给组合函数的调用方
      Type Parameters:
      V - after函数和复合函数的输出类型
      Parameters:
      after - 应用此函数后要应用的函数
      Returns:
      一个组合函数,它首先应用这个函数,然后应用after函数
      Throws:
      NullPointerException - 如果after为null