Lets consider that we have following boolean condition:
A,B,C,D.
Now we would like to filter list according to them:
list.stream().filter(x -> A).filter(x -> B).filter(x -> C).filter(x -> D)
list.stream().filter(x -> A && B && C && D)
What way is better ? I mean efficiency and elegance.