Add toString() methods to java point classes

Useful for debugging.
This commit is contained in:
Romain Vimont 2018-01-25 17:16:32 +01:00
parent dca53ff931
commit 1930c81062
2 changed files with 16 additions and 0 deletions

View file

@ -30,4 +30,13 @@ public class Point {
return screenHeight;
}
@Override
public String toString() {
return "Point{" +
"x=" + x +
", y=" + y +
", screenWidth=" + screenWidth +
", screenHeight=" + screenHeight +
'}';
}
}

View file

@ -17,4 +17,11 @@ public class RawPoint {
return y;
}
@Override
public String toString() {
return "RawPoint{" +
"x=" + x +
", y=" + y +
'}';
}
}