Skip to content

Commit

Permalink
feat: adds equality check for Datums
Browse files Browse the repository at this point in the history
  • Loading branch information
ioxua committed Jan 12, 2021
1 parent d96ff55 commit f7753ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/br/com/skywalker/coordinateconverter/Datum.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ public interface Datum {

String name();

}
default boolean isEqual(Datum other) {
return null != other &&
this.getSemiAxis() == other.getSemiAxis() &&
this.getFlatness() == other.getFlatness() &&
this.getDeltaX() == other.getDeltaX() &&
this.getDeltaY() == other.getDeltaY() &&
this.getDeltaZ() == other.getDeltaZ();
}
}

0 comments on commit f7753ed

Please sign in to comment.