Marc Palmer | 17 Jul 23:13

[groovy-user] Idea / a better way to do this?

Hi,

I wanted to see if a condition holds for all elements in a collection,  
but I cannot (it is late) see a clean simple way of doing this using  
the GDK.

We don't seem to have something like:

def allmatch = someList.holdsTrue { it.age > 25 }

I can't see how to do this at the moment without an external var of  
some kind to track state - maybe I'm missing something?

If not, shall I jira this for 2.0?

Marc

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane