grails - How to check if element in groovy array/hash/collection/list? - Stack Overflow

grails - How to check if element in groovy array/hash/collection/list? - Stack Overflow


4
down vote

 

[1,2,3].contains(1) == true

link | edit | flag
 
   
 

add comment

Some syntax sugar

1 in [1,2,3] == true

你可能感兴趣的:(Collection)