Hot answers tagged

1 vote

How do I convert multiple for loops with multiple conditions to Java 8 Stream Filter

Try the following. I typically just chain the filter calls. carVariant = cars.stream() .filter(record -> record.getCarYear().equals("2000")) .filter(x -> { ...
Reilas's user avatar
  • 4,542
1 vote
Accepted

Parsing a List with streams where every element itself is a list of Linked Hashmaps

You can use Stream.anyMatch() on the inner stream to find if any of the maps matches your condition: Returns whether any elements of this stream match the provided predicate. May not evaluate the ...
Chaosfire's user avatar
  • 4,933

Only top scored, non community-wiki answers of a minimum length are eligible