Interface TFunction<T,R>
- Type Parameters:
T- The argument typeR- The return type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
This is a functional interface that can be used to replace Function and throw exceptions.
-
Method Details
-
apply
Applies this function to the given argument and throws an exception.- Parameters:
t- The argument- Returns:
- The return value
- Throws:
Throwable- The exception
-
compose
- Type Parameters:
V- The argument type of thebeforefunction, and of the composed function- Parameters:
before- The operation to perform before this operation- Returns:
- A composed
TFunctionthat performs in sequence thebeforeoperation followed by this operation
-
andThen
- Type Parameters:
V- The return type of theafterfunction, and of the composed function- Parameters:
after- The operation to perform after this operation- Returns:
- A composed
TFunctionthat performs in sequence this operation followed by theafter
-
identity
- Type Parameters:
T- The argument type- Returns:
- A function that always returns its input argument.
-