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:
committed by
Thomas Darimont
parent
94db475afe
commit
4c5012f637
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -125,7 +125,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
return points.hashCode();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user