用lamda做循环处理时,如果想在达到某种条件终止循环,那么可以用anyMatch()方法: anyMatch()返回的是一个Boolean结果,当return true时会跳出循环 以下是我代码中的处理