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 -> {
...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
java-8 × 23083java × 17717
java-stream × 6193
lambda × 3017
spring-boot × 801
collections × 787
spring × 674
functional-programming × 581
option-type × 545
generics × 490
java-time × 476
javafx × 458
list × 443
eclipse × 411
multithreading × 391
hashmap × 389
collectors × 381
completable-future × 361
android × 360
datetime × 337
maven × 329
method-reference × 328
arrays × 313
arraylist × 263
java-11 × 256