each例子:def a = [1, 2, 3, 4]a.each { if (it == 2) return true // 满足条件本轮循环结束 println it}
Groovy 跳出each循环
原文:https://www.cnblogs.com/baxianhua/p/12102349.html