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
45 lines
956 B
Java
45 lines
956 B
Java
import java.util.Objects;
|
|
|
|
// "Convert record to class" "true-preview"
|
|
final class Point {
|
|
private final double x;
|
|
private final double y;
|
|
|
|
Point(double x, double y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
|
|
void foo() {
|
|
}
|
|
|
|
public double x() {
|
|
return x;
|
|
}
|
|
|
|
public double 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 Double.doubleToLongBits(this.x) == Double.doubleToLongBits(that.x) &&
|
|
Double.doubleToLongBits(this.y) == Double.doubleToLongBits(that.y);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(x, y);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Point[" +
|
|
"x=" + x + ", " +
|
|
"y=" + y + ']';
|
|
}
|
|
|
|
} |