I\'ve got a nested loop construct like this:
for (Type type : types) { for (Type t : types2) { if (some condition) { // Do somethin
Use a function:
public void doSomething(List types, List types2){ for(Type t1 : types){ for (Type t : types2) { if (some condition) { // Do something and return... return; } } } }