mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 10:58:45 +07:00
GitOrigin-RevId: c4db6507c258e5611f6d47b9373a0c2531802345
12 lines
318 B
Java
12 lines
318 B
Java
// "Collapse loop with stream 'max()'" "true-preview"
|
|
|
|
import java.util.Collection;
|
|
|
|
class Scratch {
|
|
native int scale();
|
|
|
|
private static Integer getMaxScale(Collection<Scratch> updated) {
|
|
int maxScale = updated.stream().mapToInt(Scratch::scale).filter(b -> b >= 0).max().orElse(0);
|
|
return maxScale;
|
|
}
|
|
} |