Assuming that this usage is logically (i.e. it calculates the desired boolean value) correct:
boolean matches = someObjectList
.stream()
.anyMatch(myObjType -> !myObjType.getSomeStatusString().equals("someStatus"));
how would that compare to:
boolean matches = someObjectList
.stream()
.map(myObjType -> myObjType.getSomeStatusString())
.anyMatch(status -> !status.equals("someStatus"));
Is one form objectively better than the other? Is there a significant difference in the bytecode? Is one an anti-pattern? Is there some Java Optimizer that makes one better than the other? I am not interested in opinion based differences such as the first is more readable, as that may differ from reader to reader....