I'm using lambda expressions. What is the equivalent of this:
for (Integer id: ids) { if (!repository.exists(id)) { throw new Exception ..... } } I tried using this:
ids.stream().filter(id-> repository.exists(idStatut)).findAny().orElseThrow(() -> new Exception... ); But it doesn't work well