Function (Java SE 25 & JDK 25)
- Type Parameters:
T- the type of the input to the functionR- the type of the result of the function
- All Known Subinterfaces:
UnaryOperator<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
andThen(Function<? super R, ? extends V> after) Returns a composed function that first applies this function to its input, and then applies the
afterfunction to the result.Applies this function to the given argument.
compose(Function<? super V, ? extends T> before) Returns a composed function that first applies the
beforefunction to its input, and then applies this function to the result.identity()Returns a function that always returns its input argument.
-
Method Details
-
apply
-
compose
-
andThen
-
identity
-