Files
openide/java/java-tests/testData/inspection/recordCanBeClass8/afterNonPublic.java
Tagir Valeev 013d13142d [java-psi] Add implicit classes to preceding comment set
Fixes IDEA-355602 Implicit class parsing: Javadoc is not attached to the method

GitOrigin-RevId: bd18f57e8106618aa741203e6cb3f4cd8cffe13d
2024-07-02 11:10:12 +00:00

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 + ']';
}
}