Add @Override to toString
This commit is contained in:
@ -110,6 +110,7 @@ public class Body {
|
|||||||
* mass, position (mass center) and current movement. Example:
|
* mass, position (mass center) and current movement. Example:
|
||||||
* "5.972E24 kg, position: [1.48E11,0.0,0.0] m, movement: [0.0,29290.0,0.0] m/s."
|
* "5.972E24 kg, position: [1.48E11,0.0,0.0] m, movement: [0.0,29290.0,0.0] m/s."
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format(
|
return String.format(
|
||||||
"%g kg, position: %s m, movement: %s m/s.",
|
"%g kg, position: %s m, movement: %s m/s.",
|
||||||
|
@ -101,6 +101,7 @@ public class BodyForceTreeMap {
|
|||||||
* Returns a readable representation of this map, in which key-value pairs are ordered
|
* Returns a readable representation of this map, in which key-value pairs are ordered
|
||||||
* descending according to the mass of the bodies.
|
* descending according to the mass of the bodies.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return toString(root);
|
return toString(root);
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ public class Vector3 {
|
|||||||
* Returns the coordinates of this vector in brackets as a string
|
* Returns the coordinates of this vector in brackets as a string
|
||||||
* in the form "[x,y,z]", e.g., "[1.48E11,0.0,0.0]".
|
* in the form "[x,y,z]", e.g., "[1.48E11,0.0,0.0]".
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("[%g,%g,%g]", x, y, z);
|
return String.format("[%g,%g,%g]", x, y, z);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user