I have this method:
filteredListIn.addAll(Stream.of(listRef)
.filter(results ->
results.getTitle().contains(query.toString().toLowerCase())
));
With these two variables:
private List<Results> listRef = new ArrayList<>();
List<Results> filteredListIn = new ArrayList<>();
But I'm getting
found for addAll(Stream) filteredListIn.addAll(Stream.of(listRef) ^ method Collection.addAll(Collection) is not applicable (argument mismatch; Stream cannot be converted to Collection) method List.addAll(Collection) is not applicable
What is the problem and how can I solve this?
Is it possible it's happening because I use external library for supporting streams under api 24?