Created
April 16, 2021 12:47
-
-
Save jeffscottbrown/ba7e4a60c523edf9376e710cb9fc4755 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def m1 = new Money('4.2') | |
| def m2 = new Money('21.12') | |
| def moneys = [m1, m2] | |
| // this call will evaluate to false | |
| // because of the way that your | |
| // equals(Object) method is implemented | |
| println moneys.contains(m1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment