Add a LambdaUtils class in tooling.common
Current status
Java 8 introduced Lambdas that produce lots of character for simple
methods like filtering, for instance:
Collection<B> filteredCollection = srcCollection.stream().filter(elem -> elem instanceof B && elem.hasXY()).collect(Collectors.toList())
This amount of chars for a such a simple task is not desired and the problem occurs in different projects (AF3, SmartFIT).
Proposed Solution
Create a LambdaUtils class in either tooling.base or tooling.kernel that hides these long constructs by providing some static convenience methods for the most common tasks.
In this example:
Collection<B> filteredCollection = LambdaUtils.filter(elem -> elem instanceof B && elem.hasXY()))
With a static import:
Collection<B> filteredCollection = filter(elem -> elem instanceof B && elem.hasXY()))
These static methods already exist, they mainly need to be merged.
(from redmine: issue id 2779, created on 2016-12-07, closed on 2017-11-28)