mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
13 lines
303 B
Java
13 lines
303 B
Java
// "Replace with findFirst()" "true"
|
|
|
|
import java.awt.*;
|
|
import java.util.List;
|
|
import java.util.Objects;
|
|
|
|
public class Main {
|
|
private final Point field = new Point(0, 0);
|
|
|
|
public Point find(List<Point> points) {
|
|
return points.stream().filter(Objects::nonNull).findFirst().orElse(field);
|
|
}
|
|
} |