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