groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Søren Berg Glasius (GR8Conf EU)" <sbglas...@gr8conf.org>
Subject Re: not sure about Collection.intersect
Date Mon, 08 Feb 2016 14:31:50 GMT
And by the way,

the easy way to implement equals and haschode is this:

import groovy.transform.EqualsAndHashCode

@EqualsAndHashCode
class TestClass {
    String name
}

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Edinson E. Padrón Urdaneta <edinson.padron.urdaneta@gmail.com>
Reply: users@groovy.apache.org <users@groovy.apache.org>
Date: February 8, 2016 at 15:29:00
To: users@groovy.apache.org <users@groovy.apache.org>
Subject:  Re: not sure about Collection.intersect  

I have to look at the implementation of the `intersect` method to be sure but does your TestClass
class overwrite `hashcode` and `equal`? There should be a way to compare the instances of
said class.
Mime
View raw message