Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jeffscottbrown/ba7e4a60c523edf9376e710cb9fc4755 to your computer and use it in GitHub Desktop.

Select an option

Save jeffscottbrown/ba7e4a60c523edf9376e710cb9fc4755 to your computer and use it in GitHub Desktop.
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