Package org.apache.pekko.japi.function
Interface Function<T,R>
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
StatefulMapConcatAccumulator<In,Out>
A Function interface. Used to create 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.Function counterpart does not.-
Method Summary
Modifier and TypeMethodDescriptionCreates a composed function that first applies this function to its input, then appliesgto the result.That is, the resulting function is equivalent tothis(g(v)).
-
Method Details
-
apply
- Throws:
Exception
-
compose
That is, the resulting function is equivalent tothis(g(v)).- Since:
- 2.0.0
-
andThen
Creates a composed function that first applies this function to its input, then appliesgto the result.- Since:
- 2.0.0
-