mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-27 05:20:54 +07:00
19 lines
500 B
Java
19 lines
500 B
Java
|
|
record Point(int x, int y, int z) {
|
|
|
|
public final boolean equals(Object o) {
|
|
if (!(o instanceof Point)) return false;
|
|
if (!super.equals(o)) return false;
|
|
|
|
final Point point = (Point) o;
|
|
return x() == point.x() && y() == point.y() && z() == point.z();
|
|
}
|
|
|
|
public int hashCode() {
|
|
int result = super.hashCode();
|
|
result = 31 * result + x();
|
|
result = 31 * result + y();
|
|
result = 31 * result + z();
|
|
return result;
|
|
}
|
|
} |