Files
openide/java/java-tests/testData/inspection/recordCanBeClass8/afterSimple.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

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