Use a while loop and change the condition to false once you're done, you'll 
have to manually iterate though.  Or you could do as suggested and use the 
return tag, just move the loop out to a separate inline simple-method so that 
the return only effects the loop.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 22/06/2011, at 9:04 PM, Pierre Smits wrote:

> Hi all,
> 
> I am stumped... I need to iterate through a list to find the the first entry
> given a set of parameters in a simple-method, but how do I escape from the
> iteration after having found the entry?
> 
> I know that in groovy I can do a while loop and if I have found the entry I
> can issue a 'break; and close the iteration. But how do I do this in the
> interation in a simple-method?
> 
> Regards,
> 
> Pierre

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to