I'm trying to filter a list myList, but only if the another list choosenThings is NOT null.
Optionally: Check if it has at least one element.
myList - the base list I'm filtering
choosenThings - list with something data
myList.stream()
.filter(e -> choosenThings.contains(e.getKindId()))
.collect(Collectors.toList());
How can I do this? Is it possible to do this in filter?