static ItIt iterateUpdatingProgressBar(JProgressBar progressBar, Collection l) {
if (progressBar == null) ret iterableIterator(l);
ret iteratorFromFunction_withEndMarker_f0(new F0 {
int n = l(l), i;
Iterator it = iterator(l);
NotTooOften nto = onlyTenTimesASecond();
public O get() {
if (!it.hasNext()) {
setProgressBarValue(progressBar, n, n);
setProgressBarText(progressBar, n + " / " + n);
ret endMarker();
}
if (nto.yo()) {
setProgressBarValue(progressBar, i, n);
setProgressBarText(progressBar, i + " / " + n);
}
++i;
ret it.next();
}
});
}