mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 22:31:52 +00:00
use pattern variables
This commit is contained in:
+1
-2
@@ -34,8 +34,7 @@ public class Point {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof Point)) return false;
|
||||
Point that = (Point) obj;
|
||||
if(!(obj instanceof Point that)) return false;
|
||||
return this.x == that.x && this.z == that.z;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user