So I’ve been wondering what offers best performance:
Note: items are rarely added/removed from this list after initialization.
list.stream().anyMatch((i) -> (i.check()));
or:
for (Object i : list) {
if (i.check()) {
return true;
}
}
return false;