Project with helper classes for dealing with lambdas.
-
Checked variants of Consumer and Function
When using lambdas, checked exceptions cannot be used easily. Using a small wrapper, this becomes possible:
List<String> strings = Arrays.asList("Hello", "World", "Test"); strings.stream().map(CheckedFunction.convert(s -> new FileInputStream(s))); -
Processors for parallel work
During the execution of lambdas exceptions may occur which cause the execution to stop. However, maybe one just wants to continue processing the next item, storing the caught exceptions and using them later.AbstractWorkProcessorandDefaultWorkProcessorcan be used in this scenario.