Interface ConsumingRunnable<T,E extends Throwable>
- Type Parameters:
T- The type of the accepted value.E- The type of the accepted exception.
public interface ConsumingRunnable<T,E extends Throwable>
A runnable consuming an object of type
T or an exception of
type E. This allows for combining runnables.- Author:
- Ulrich Kreher
-
Method Summary
Modifier and TypeMethodDescriptionvoidconsumeException(E exception) Consumes the designated exception.voidconsumeResult(T result) Consumes the designated result.
-
Method Details
-
consumeResult
Consumes the designated result.- Parameters:
result- The result to be consumed.
-
consumeException
Consumes the designated exception.- Parameters:
exception- The exception to be consumed.
-