9 May 21:03
[groovy-user] grep usage
From: Vinny <xaymaca@...>
Subject: [groovy-user] grep usage
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-09 19:06:44 GMT
Subject: [groovy-user] grep usage
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-09 19:06:44 GMT
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
RSS Feed