mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-23 20:05:01 +07:00
GitOrigin-RevId: 4ac219e418cc0bef8e1930d14d53256e3c87be6e
11 lines
362 B
Java
11 lines
362 B
Java
// "Replace the loop with Collection.removeIf" "true"
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testIterator(List<List<String>> data, boolean b) {
|
|
for(Ite<caret>rator<List<String>> iter = (data.iterator()); iter.hasNext();)
|
|
if(iter.next().isEmpty() && /* also check the flag */ b)
|
|
iter.remove();
|
|
}
|
|
} |