java break in foreach

Java
Optional<SomeObject> result =
    someObjects.stream().filter(obj -> some_condition_met).findFirst();
Source

Also in Java: