54 lines
1.6 KiB
Java
54 lines
1.6 KiB
Java
package o;
|
|
|
|
import java.util.Iterator;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class SJW<T, R> extends ApF<R> {
|
|
private Iterator<? extends R> c;
|
|
private YKU<? extends R> d;
|
|
private final InterfaceC1244Ytw<? super T, ? extends YKU<? extends R>> i;
|
|
private final Iterator<? extends T> j;
|
|
|
|
public SJW(Iterator<? extends T> it, InterfaceC1244Ytw<? super T, ? extends YKU<? extends R>> interfaceC1244Ytw) {
|
|
this.j = it;
|
|
this.i = interfaceC1244Ytw;
|
|
}
|
|
|
|
@Override // o.ApF
|
|
public final void b() {
|
|
Iterator<? extends R> it = this.c;
|
|
if (it != null && it.hasNext()) {
|
|
this.b = this.c.next();
|
|
this.a = true;
|
|
return;
|
|
}
|
|
while (this.j.hasNext()) {
|
|
Iterator<? extends R> it2 = this.c;
|
|
if (it2 == null || !it2.hasNext()) {
|
|
YKU<? extends R> yku = this.d;
|
|
if (yku != null) {
|
|
yku.close();
|
|
this.d = null;
|
|
}
|
|
YKU<? extends R> d = this.i.d(this.j.next());
|
|
if (d != null) {
|
|
this.c = d.b;
|
|
this.d = d;
|
|
}
|
|
}
|
|
Iterator<? extends R> it3 = this.c;
|
|
if (it3 != null && it3.hasNext()) {
|
|
this.b = this.c.next();
|
|
this.a = true;
|
|
return;
|
|
}
|
|
}
|
|
this.a = false;
|
|
YKU<? extends R> yku2 = this.d;
|
|
if (yku2 != null) {
|
|
yku2.close();
|
|
this.d = null;
|
|
}
|
|
}
|
|
}
|