how to collect data in a list from stream code example
Example: java stream to list
List<String> temp = toCheck.stream().map((a -> a.getFoo())).collect(Collectors.toList());
List<String> temp = toCheck.stream().map((a -> a.getFoo())).collect(Collectors.toList());