final java.util.List objects = getObjects(); for (java.lang.Object object : objects) { if(object.isEmpty) { break; } }