It looks like helpFunction(item)
returns some instance of some class that has a boolean status()
method, and you want your method to return true
if helpFunction(item).status()
is true
for any element of your Stream
.
You can implement this logic with anyMatch
:
public boolean status(List<String> myArray) {
return myArray.stream()
.anyMatch(item -> helpFunction(item).status());
}