Package org.apache.pekko.japi.function
Interface Function2<T1,T2,R>
- All Superinterfaces:
Serializable
A Function interface. Used to create 2-arg first-class-functions is Java.
Serializable is needed to be able to grab line number for Java 8 lambdas.
Supports throwing Exception in the apply, which the java.util.function.BiFunction counterpart does not.-
Method Summary
-
Method Details
-
andThen
Compose this function with another functiong, such that the resulting function is equivalent tog(this(x1, x2)). This creates a composed function that first applies this function to its arguments, and then applies functiongto the result.- Since:
- 2.0.0
-
apply
- Throws:
Exception
-