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

113 lines
3.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
/* loaded from: classes6.dex */
public final class fXP<T, U, R> extends fUX<T, R> {
private fSL<? super T, ? super U, ? extends R> a;
private InterfaceC13169fSq<? extends U> b;
public fXP(InterfaceC13169fSq<T> interfaceC13169fSq, fSL<? super T, ? super U, ? extends R> fsl, InterfaceC13169fSq<? extends U> interfaceC13169fSq2) {
super(interfaceC13169fSq);
this.a = fsl;
this.b = interfaceC13169fSq2;
}
@Override // o.AbstractC13163fSk
public final void subscribeActual(InterfaceC13174fSv<? super R> interfaceC13174fSv) {
C13406fZi c13406fZi = new C13406fZi(interfaceC13174fSv);
LWm lWm = new LWm(c13406fZi, this.a);
c13406fZi.onSubscribe(lWm);
this.b.subscribe(new HBt(this, lWm));
this.c.subscribe(lWm);
}
/* loaded from: classes6.dex */
static final class LWm<T, U, R> extends AtomicReference<U> implements InterfaceC13174fSv<T>, fSJ {
final AtomicReference<fSJ> a = new AtomicReference<>();
final AtomicReference<fSJ> c = new AtomicReference<>();
private fSL<? super T, ? super U, ? extends R> d;
final InterfaceC13174fSv<? super R> e;
LWm(InterfaceC13174fSv<? super R> interfaceC13174fSv, fSL<? super T, ? super U, ? extends R> fsl) {
this.e = interfaceC13174fSv;
this.d = fsl;
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
EnumC13192fTf.a(this.a, fsj);
}
@Override // o.InterfaceC13174fSv
public final void onNext(T t) {
U u = get();
if (u != null) {
try {
this.e.onNext(Objects.requireNonNull(this.d.e(t, u), "The combiner returned a null value"));
} catch (Throwable th) {
C13147fSI.c(th);
dispose();
this.e.onError(th);
}
}
}
@Override // o.InterfaceC13174fSv
public final void onError(Throwable th) {
EnumC13192fTf.e(this.c);
this.e.onError(th);
}
@Override // o.InterfaceC13174fSv
public final void onComplete() {
EnumC13192fTf.e(this.c);
this.e.onComplete();
}
@Override // o.fSJ
public final void dispose() {
EnumC13192fTf.e(this.a);
EnumC13192fTf.e(this.c);
}
@Override // o.fSJ
public final boolean isDisposed() {
return EnumC13192fTf.c(this.a.get());
}
}
/* loaded from: classes6.dex */
final class HBt implements InterfaceC13174fSv<U> {
private final LWm<T, U, R> a;
private fXP b;
@Override // o.InterfaceC13174fSv
public final void onComplete() {
}
HBt(fXP fxp, LWm<T, U, R> lWm) {
this.b = fxp;
this.a = lWm;
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
EnumC13192fTf.a(this.a.c, fsj);
}
@Override // o.InterfaceC13174fSv
public final void onNext(U u) {
this.a.lazySet(u);
}
@Override // o.InterfaceC13174fSv
public final void onError(Throwable th) {
LWm<T, U, R> lWm = this.a;
EnumC13192fTf.e(lWm.a);
lWm.e.onError(th);
}
}
}