mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
Fixes IDEA-355602 Implicit class parsing: Javadoc is not attached to the method GitOrigin-RevId: bd18f57e8106618aa741203e6cb3f4cd8cffe13d
41 lines
827 B
Java
41 lines
827 B
Java
import java.util.Objects;
|
|
|
|
// "Convert record to class" "true-preview"
|
|
public final class Point {
|
|
private final int x;
|
|
private final int y;
|
|
|
|
public Point(int x, int y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
|
|
public int x() {
|
|
return x;
|
|
}
|
|
|
|
public int y() {
|
|
return y;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (obj == this) return true;
|
|
if (obj == null || obj.getClass() != this.getClass()) return false;
|
|
Point that = (Point) obj;
|
|
return this.x == that.x &&
|
|
this.y == that.y;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(x, y);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Point[" +
|
|
"x=" + x + ", " +
|
|
"y=" + y + ']';
|
|
}
|
|
} |