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

89 lines
2.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
/* loaded from: classes6.dex */
public final class fVO<T> extends AbstractC13159fSg<T> implements InterfaceC13204fTr<T> {
private InterfaceC13169fSq<T> a;
private long d;
public fVO(InterfaceC13169fSq<T> interfaceC13169fSq, long j) {
this.a = interfaceC13169fSq;
this.d = j;
}
@Override // o.AbstractC13159fSg
public final void a(InterfaceC13161fSi<? super T> interfaceC13161fSi) {
this.a.subscribe(new HBt(interfaceC13161fSi, this.d));
}
@Override // o.InterfaceC13204fTr
public final AbstractC13163fSk<T> b() {
return new fVL(this.a, this.d, null, false);
}
/* loaded from: classes6.dex */
static final class HBt<T> implements InterfaceC13174fSv<T>, fSJ {
private long a;
private InterfaceC13161fSi<? super T> b;
private boolean c;
private fSJ d;
private long e;
HBt(InterfaceC13161fSi<? super T> interfaceC13161fSi, long j) {
this.b = interfaceC13161fSi;
this.e = j;
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
if (EnumC13192fTf.d(this.d, fsj)) {
this.d = fsj;
this.b.onSubscribe(this);
}
}
@Override // o.fSJ
public final void dispose() {
this.d.dispose();
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.d.isDisposed();
}
@Override // o.InterfaceC13174fSv
public final void onNext(T t) {
if (this.c) {
return;
}
long j = this.a;
if (j != this.e) {
this.a = j + 1;
return;
}
this.c = true;
this.d.dispose();
this.b.e(t);
}
@Override // o.InterfaceC13174fSv
public final void onError(Throwable th) {
if (this.c) {
C13418fZu.c(th);
} else {
this.c = true;
this.b.onError(th);
}
}
@Override // o.InterfaceC13174fSv
public final void onComplete() {
if (this.c) {
return;
}
this.c = true;
this.b.onComplete();
}
}
}