).size()
>
>
>
> In Groovy <= 2.3.9 the output is 1
>
> In Groovy > 2.3.9 the output is 0
>
>
>
>
>
>
>
> From: Edinson E. Padrón Urdaneta [mailto:edinson.padron.urdan...@gmail.com]
> Sent: Tuesday, 9 February 2016 1:29 AM
> To: users@groovy.apach
Groovy <= 2.3.9 the output is 1
In Groovy > 2.3.9 the output is 0
From: Edinson E. Padrón Urdaneta [mailto:edinson.padron.urdan...@gmail.com]
Sent: Tuesday, 9 February 2016 1:29 AM
To: users@groovy.apache.org
Subject: Re: not sure about Collection.intersect
I have to look at the implemen
t: Re: not sure about Collection.intersect
Could it be that you're using a String instead of a List of String as the value
for the `includes` element?
Check this:
http://docs.groovy-lang.org/next/html/gapi/groovy/transform/EqualsAndHashCod
Could it be that you're using a String instead of a List of String as the
value for the `includes` element?
Check this:
http://docs.groovy-lang.org/next/html/gapi/groovy/transform/EqualsAndHashCode.html#includes
@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.
Oh! I'm sorry, I don't know why I didn't notice the class's code.
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.
vej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem
From: Strachan, Paul
Reply: users@groovy.apache.org
Date: February 8, 2016 at 15:12:06
To: users@groovy.apache.org
Subject: not sure about Collection.intersect
Groovy 2.4.4 / 2.4.5
Hi – I’d like to get a li
Groovy 2.4.4 / 2.4.5
Hi - I'd like to get a list of objects from collection A that exist in
collection B using intersect() but I'm getting no results:
def c1 = []// as Set
def c2 = []// as Set
c1 << new TestClass(name: 'mike')
c2 << new TestClass(name: 'mike')
println c1.contains(c2[0])
assert