Module com.machinezoo.noexception
Interface ThrowingIntFunction<R>
-
- Type Parameters:
-
R- seeIntFunction
- 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 ThrowingIntFunction<R>
Variation ofIntFunctionthat allows throwing checked exceptions.ThrowingIntFunctionis usually implemented by a lambda and passed toCheckedExceptionHandler.fromIntFunction(ThrowingIntFunction). See noexception tutorial.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rapply(int value)Variation ofIntFunction.apply(int)that allows throwing checked exceptions.
-
-
-
Method Detail
-
apply
R apply(int value) throws Throwable
Variation ofIntFunction.apply(int)that allows throwing checked exceptions.- Parameters:
-
value- seeIntFunction.apply(int) - Returns:
-
see
IntFunction.apply(int) - Throws:
-
Throwable- if unable to complete - See Also:
-
CheckedExceptionHandler.fromIntFunction(ThrowingIntFunction),IntFunction.apply(int)
-
-