-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hashcode and equals methods to LatLong (#179)
* Add hashcode and equals methods to LatLong Discovered that LatLong doesn't actually implement hashcode() or equals(), so we can't actually put it into a Set<> or call distinct() on it in a stream. Used IntelliJ IDEA's automatic generation of these things. Happy to change the implementation if desired. * Performance fix Objects.hashCode() under the hood creates a bunch of objects we don't need, so directly create and aggregate the hashcodes.
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters