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

83 lines
2.4 KiB
Java

package o;
import java.util.Collection;
/* loaded from: classes6.dex */
public final class fXJ<T, U extends Collection<? super T>> extends AbstractC13175fSw<U> implements InterfaceC13204fTr<U> {
private InterfaceC13189fTc<U> b;
private InterfaceC13169fSq<T> e;
public fXJ(InterfaceC13169fSq<T> interfaceC13169fSq, int i) {
this.e = interfaceC13169fSq;
this.b = C13194fTh.b(i);
}
public fXJ(InterfaceC13169fSq<T> interfaceC13169fSq, InterfaceC13189fTc<U> interfaceC13189fTc) {
this.e = interfaceC13169fSq;
this.b = interfaceC13189fTc;
}
@Override // o.AbstractC13175fSw
public final void e(InterfaceC13176fSx<? super U> interfaceC13176fSx) {
try {
this.e.subscribe(new IeS(interfaceC13176fSx, (Collection) fYR.d(this.b.d(), "The collectionSupplier returned a null Collection.")));
} catch (Throwable th) {
C13147fSI.c(th);
EnumC13195fTi.c(th, interfaceC13176fSx);
}
}
@Override // o.InterfaceC13204fTr
public final AbstractC13163fSk<U> b() {
return new fXF(this.e, this.b);
}
/* loaded from: classes6.dex */
static final class IeS<T, U extends Collection<? super T>> implements InterfaceC13174fSv<T>, fSJ {
private InterfaceC13176fSx<? super U> a;
private fSJ c;
private U d;
IeS(InterfaceC13176fSx<? super U> interfaceC13176fSx, U u) {
this.a = interfaceC13176fSx;
this.d = u;
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
if (EnumC13192fTf.d(this.c, fsj)) {
this.c = fsj;
this.a.onSubscribe(this);
}
}
@Override // o.fSJ
public final void dispose() {
this.c.dispose();
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.c.isDisposed();
}
@Override // o.InterfaceC13174fSv
public final void onNext(T t) {
this.d.add(t);
}
@Override // o.InterfaceC13174fSv
public final void onError(Throwable th) {
this.d = null;
this.a.onError(th);
}
@Override // o.InterfaceC13174fSv
public final void onComplete() {
U u = this.d;
this.d = null;
this.a.e(u);
}
}
}