Package com.google.mu.function
Interface CheckedFunction<F,T,E extends Throwable>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A function that can throw checked exceptions.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <R> CheckedFunction
<F, R, E> andThen
(CheckedFunction<? super T, ? extends R, ? extends E> mapper) Returns a newCheckedFunction
that maps the return value usingmapper
.
-
Method Details
-
apply
- Throws:
E
-
andThen
default <R> CheckedFunction<F,R, andThenE> (CheckedFunction<? super T, ? extends R, ? extends E> mapper) Returns a newCheckedFunction
that maps the return value usingmapper
. For example:(x -> x).andThen(Object::toString).apply(1) => "1"
.
-