Module org.klojang.check
Package org.klojang.check.fallible
Interface FallibleIntUnaryOperator<X extends Throwable>
- Type Parameters:
X
- the type of the exception potentially being thrown
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An alternative to the
IntUnaryOperator
interface that
allows the functional method to throw a checked exception.- Author:
- Ayco Holleman
-
Method Summary
Modifier and TypeMethodDescriptionint
applyAsInt
(int operand) Applies this operator to the given operand.
-
Method Details
-
applyAsInt
int applyAsInt(int operand) throws X Applies this operator to the given operand.- Parameters:
operand
- the operand- Returns:
- the operator result
- Throws:
X
- if the operation fails
-