DATACMNS-437 - Polishing of newly introduced geo value objects.

Polished JavaDoc. Simplified equals(…) and hashCode() methods where possible. Added additional null checks where appropriate. Removed obsolete generics in Polygon and switched to an immutable collection for the Points making up the Polygon. Added missing toString() method to Polygon.
Added test cases for String representations.

Related pull request: #68.
This commit is contained in:
Oliver Gierke
2014-03-07 08:58:48 +01:00
committed by Thomas Darimont
parent 94db475afe
commit 4c5012f637
6 changed files with 32 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ public class Circle implements Shape {
*/
@Override
public String toString() {
return String.format("Circle: [center=%s, radius=%f]", center, radius);
return String.format("Circle: [center=%s, radius=%s]", center, radius);
}
/*

View File

@@ -125,7 +125,7 @@ public class Polygon implements Iterable<Point>, Shape {
return points.hashCode();
}
/*
/*
* (non-Javadoc)
* @see java.lang.Object#toString()
*/