diff options
Diffstat (limited to 'src/net/cbaines/suma/Polygon.java')
-rw-r--r-- | src/net/cbaines/suma/Polygon.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/net/cbaines/suma/Polygon.java b/src/net/cbaines/suma/Polygon.java index b10fbc4..55828cb 100644 --- a/src/net/cbaines/suma/Polygon.java +++ b/src/net/cbaines/suma/Polygon.java @@ -24,30 +24,30 @@ import java.io.Serializable; import org.osmdroid.util.GeoPoint; public class Polygon implements Serializable { - /** + /** * */ - private static final long serialVersionUID = 3029139596630651715L; + private static final long serialVersionUID = 3029139596630651715L; - public final GeoPoint[] points; + public final GeoPoint[] points; - Polygon() { - points = null; - } + Polygon() { + points = null; + } + + public Polygon(GeoPoint[] points) { + this.points = points; + } - public Polygon(GeoPoint[] points) { - this.points = points; - } + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("Polygon "); - @Override - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("Polygon "); + for (GeoPoint point : points) { + builder.append(point.getLatitudeE6() + " " + point.getLongitudeE6()); + } - for (GeoPoint point : points) { - builder.append(point.getLatitudeE6() + " " + point.getLongitudeE6()); + return builder.toString(); } - - return builder.toString(); - } } |