Vinny | 9 May 21:03
Picon

[groovy-user] grep usage

Ok, Newb question.
Is it possible to use the groovy grep method to filter a javabean from a list based on the value of
one of it's properties?

Something on the order of :

for(p in list.grep(p.ID == 111)) {
    print p

}  

// The above code does not work btw.

Thanks in advance



--
The future is here. It's just not widely distributed yet.
-William Gibson


Gmane