@Test public void toStringTest() { Point point = new Point(X, Y); Assert.assertEquals(POINT_TO_STRING, point.toString()); }
@Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("x="); stringBuilder.append(this.x); stringBuilder.append(", y="); stringBuilder.append(this.y); return stringBuilder.toString(); }
Point implements Comparable<Point>, Serializable { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("x="); stringBuilder.append(this.x); stringBuilder.append(", y="); stringBuilder.append(this.y); return stringBuilder.toString(); } }
Point implements Comparable<Point>, Serializable { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("x="); stringBuilder.append(this.x); stringBuilder.append(", y="); stringBuilder.append(this.y); return stringBuilder.toString(); } Point(double x, double y); }
Point implements Comparable<Point>, Serializable { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("x="); stringBuilder.append(this.x); stringBuilder.append(", y="); stringBuilder.append(this.y); return stringBuilder.toString(); } Point(double x, double y); @Override int compareTo(Point point); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
Point implements Comparable<Point>, Serializable { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("x="); stringBuilder.append(this.x); stringBuilder.append(", y="); stringBuilder.append(this.y); return stringBuilder.toString(); } Point(double x, double y); @Override int compareTo(Point point); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); final double x; final double y; }