Add toString() methods to java point classes
Useful for debugging.
This commit is contained in:
parent
dca53ff931
commit
1930c81062
2 changed files with 16 additions and 0 deletions
|
@ -30,4 +30,13 @@ public class Point {
|
||||||
return screenHeight;
|
return screenHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Point{" +
|
||||||
|
"x=" + x +
|
||||||
|
", y=" + y +
|
||||||
|
", screenWidth=" + screenWidth +
|
||||||
|
", screenHeight=" + screenHeight +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,4 +17,11 @@ public class RawPoint {
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "RawPoint{" +
|
||||||
|
"x=" + x +
|
||||||
|
", y=" + y +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue