class cls { def fn() { def a = [ 'aa', 'bb', 'cc', ] print a.findAll{ 'aa' != it && 'cc' != it } } } c= new cls() c.fn()