Package org.dmfs.jems2.fragileprocedure
Class Composite<T,E extends Exception>
java.lang.Object
org.dmfs.jems2.fragileprocedure.Composite<T,E>
- All Implemented Interfaces:
FragileProcedure<T,E>
A
FragileProcedure composed of other procedures. Note, this FragileProcedure makes no attempt
at calling more delegates after the first one threw an Exception.
Example
new Composite<>(System.out::println, Logger::info).process("log message");
Prints "log message" to the console and to the log.-
Constructor Summary
ConstructorsConstructorDescriptionComposite(Iterable<? extends FragileProcedure<? super T, ? extends E>> delegates) Composite(FragileProcedure<? super T, ? extends E>... delegates) -
Method Summary
-
Constructor Details
-
Composite
-
Composite
-
-
Method Details
-
process
Description copied from interface:FragileProcedureExecutes the procedure with the given argument.
-