The Groovy \"in\" operator seems to mean different things in different cases. Sometimes x in y means y.contains(x) and sometimes it seems to call
x in y
y.contains(x)
It's actually all based on isCase. Groovy adds an isCase method to Collections that is based on the contains method. Any class with isCase can be used with in.