Align toString methods in geo module (#13302)

* Align toString methods in geo module
This commit is contained in:
Tim Grein 2024-05-14 16:31:34 +02:00 committed by GitHub
parent 37837133c3
commit dae7181a97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 8 additions and 6 deletions

View File

@ -93,7 +93,7 @@ public final class Circle extends LatLonGeometry {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("CIRCLE(");
sb.append("Circle(");
sb.append("[" + lat + "," + lon + "]");
sb.append(" radius = " + radiusMeters + " meters");
sb.append(')');

View File

@ -134,7 +134,7 @@ public class Line extends LatLonGeometry {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("LINE(");
sb.append("Line(");
for (int i = 0; i < lats.length; i++) {
sb.append("[").append(lons[i]).append(", ").append(lats[i]).append("]");
}

View File

@ -208,6 +208,7 @@ public final class Polygon extends LatLonGeometry {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Polygon");
for (int i = 0; i < polyLats.length; i++) {
sb.append("[").append(polyLats[i]).append(", ").append(polyLons[i]).append("] ");
}

View File

@ -274,7 +274,7 @@ final class Rectangle2D implements Component2D {
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("XYRectangle(x=");
sb.append("Rectangle2D(x=");
sb.append(minX);
sb.append(" TO ");
sb.append(maxX);

View File

@ -94,7 +94,7 @@ public final class XYCircle extends XYGeometry {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("CIRCLE(");
sb.append("XYCircle(");
sb.append("[" + x + "," + y + "]");
sb.append(" radius = " + radius);
sb.append(')');

View File

@ -126,7 +126,7 @@ public class XYLine extends XYGeometry {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("XYLINE(");
sb.append("XYLine(");
for (int i = 0; i < x.length; i++) {
sb.append("[").append(x[i]).append(", ").append(y[i]).append("]");
}

View File

@ -78,7 +78,7 @@ public final class XYPoint extends XYGeometry {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Point(");
sb.append("XYPoint(");
sb.append(x);
sb.append(",");
sb.append(y);

View File

@ -187,6 +187,7 @@ public final class XYPolygon extends XYGeometry {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("XYPolygon");
for (int i = 0; i < x.length; i++) {
sb.append("[").append(x[i]).append(", ").append(y[i]).append("] ");
}