Module com.machinezoo.noexception
Interface ThrowingFunction<T,R>
-
- All Known Subinterfaces:
-
ThrowingUnaryOperator<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ThrowingFunction<T,R>
Variation ofFunctionthat allows throwing checked exceptions.ThrowingFunctionis usually implemented by a lambda and passed toCheckedExceptionHandler.function(ThrowingFunction). See noexception tutorial.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rapply(T t)Variation ofFunction.apply(Object)that allows throwing checked exceptions.
-
-
-
Method Detail
-
apply
R apply(T t) throws Throwable
Variation ofFunction.apply(Object)that allows throwing checked exceptions.- Parameters:
-
t- seeFunction.apply(Object) - Returns:
-
see
Function.apply(Object) - Throws:
-
Throwable- if unable to complete - See Also:
-
CheckedExceptionHandler.function(ThrowingFunction),Function.apply(Object)
-
-