groovy同时迭代多个List

2015-12-14 0 429
groovy同时迭代多个List
def list1 = [1, 2, 3]   
def list2 = [4, 5, 6]  
def result = true  
list1.eachWithIndex { n, i ->   
    if (n >= list2[i]) result = false  
}   
assert result  

遇见资源网 groovy groovy同时迭代多个List http://www.ox520.com/13779.html

上一篇:

已经没有上一篇了!

下一篇:

已经没有下一篇了!

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务