Groovy equivalent for ruby all and none
Yes, its !any
(for Ruby's none
) and every
(for Ruby's all
):
def list = [1, 2]assert !list.any { it < 0 }assert list.every { it > 0 }
See also documentation at http://groovy.codehaus.org/JN1015-Collections