what-the-bank/sources/o/C13297fWf.java

123 lines
3.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.Iterator;
import java.util.Objects;
/* renamed from: o.fWf, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C13297fWf<T> extends AbstractC13163fSk<T> {
private Iterable<? extends T> d;
public C13297fWf(Iterable<? extends T> iterable) {
this.d = iterable;
}
@Override // o.AbstractC13163fSk
public final void subscribeActual(InterfaceC13174fSv<? super T> interfaceC13174fSv) {
try {
Iterator<? extends T> it = this.d.iterator();
try {
if (!it.hasNext()) {
EnumC13195fTi.e(interfaceC13174fSv);
return;
}
HBt hBt = new HBt(interfaceC13174fSv, it);
interfaceC13174fSv.onSubscribe(hBt);
if (hBt.a) {
return;
}
while (!hBt.isDisposed()) {
try {
hBt.b.onNext(Objects.requireNonNull(hBt.d.next(), "The iterator returned a null value"));
if (hBt.isDisposed()) {
return;
}
try {
if (!hBt.d.hasNext()) {
if (hBt.isDisposed()) {
return;
}
hBt.b.onComplete();
return;
}
} catch (Throwable th) {
C13147fSI.c(th);
hBt.b.onError(th);
return;
}
} catch (Throwable th2) {
C13147fSI.c(th2);
hBt.b.onError(th2);
return;
}
}
} catch (Throwable th3) {
C13147fSI.c(th3);
EnumC13195fTi.a(th3, interfaceC13174fSv);
}
} catch (Throwable th4) {
C13147fSI.c(th4);
EnumC13195fTi.a(th4, interfaceC13174fSv);
}
}
/* renamed from: o.fWf$HBt */
/* loaded from: classes6.dex */
static final class HBt<T> extends fTJ<T> {
boolean a;
final InterfaceC13174fSv<? super T> b;
private volatile boolean c;
final Iterator<? extends T> d;
private boolean e;
private boolean j;
HBt(InterfaceC13174fSv<? super T> interfaceC13174fSv, Iterator<? extends T> it) {
this.b = interfaceC13174fSv;
this.d = it;
}
@Override // o.InterfaceC13414fZq
public final T b() {
if (this.j) {
return null;
}
if (!this.e) {
this.e = true;
} else if (!this.d.hasNext()) {
this.j = true;
return null;
}
return (T) Objects.requireNonNull(this.d.next(), "The iterator returned a null value");
}
@Override // o.InterfaceC13413fZp
public final int b(int i) {
if ((i & 1) == 0) {
return 0;
}
this.a = true;
return 1;
}
@Override // o.InterfaceC13414fZq
public final boolean c() {
return this.j;
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.c;
}
@Override // o.fSJ
public final void dispose() {
this.c = true;
}
@Override // o.InterfaceC13414fZq
public final void e() {
this.j = true;
}
}
}