stream filter collect example
Example: java stream filter
List<String> result = lines.stream()
.filter(line -> "theLineIWant".equals(line))
.collect(Collectors.toList());
List<String> result = lines.stream()
.filter(line -> "theLineIWant".equals(line))
.collect(Collectors.toList());