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

79 lines
2.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
/* loaded from: classes6.dex */
public abstract class fTV<T, U, V> extends C13228fUg implements InterfaceC13174fSv<T>, InterfaceC13361fYY<U, V> {
public final InterfaceC13174fSv<? super V> a;
public volatile boolean b;
public final InterfaceC13408fZk<U> d;
public volatile boolean e;
private Throwable i;
@Override // o.InterfaceC13361fYY
public void a(InterfaceC13174fSv<? super V> interfaceC13174fSv, U u) {
}
public fTV(InterfaceC13174fSv<? super V> interfaceC13174fSv, InterfaceC13408fZk<U> interfaceC13408fZk) {
this.a = interfaceC13174fSv;
this.d = interfaceC13408fZk;
}
/* JADX INFO: Access modifiers changed from: protected */
public final void a(U u, fSJ fsj) {
InterfaceC13174fSv<? super V> interfaceC13174fSv = this.a;
InterfaceC13408fZk<U> interfaceC13408fZk = this.d;
if (this.c.get() == 0 && this.c.compareAndSet(0, 1)) {
a(interfaceC13174fSv, (InterfaceC13174fSv<? super V>) u);
if (this.c.addAndGet(-1) == 0) {
return;
}
} else {
interfaceC13408fZk.b(u);
if (this.c.getAndIncrement() != 0) {
return;
}
}
C13360fYU.e(interfaceC13408fZk, interfaceC13174fSv, false, fsj, this);
}
public final void c(U u, fSJ fsj) {
InterfaceC13174fSv<? super V> interfaceC13174fSv = this.a;
InterfaceC13408fZk<U> interfaceC13408fZk = this.d;
if (this.c.get() == 0 && this.c.compareAndSet(0, 1)) {
if (interfaceC13408fZk.c()) {
a(interfaceC13174fSv, (InterfaceC13174fSv<? super V>) u);
if (this.c.addAndGet(-1) == 0) {
return;
}
} else {
interfaceC13408fZk.b(u);
}
} else {
interfaceC13408fZk.b(u);
if (this.c.getAndIncrement() != 0) {
return;
}
}
C13360fYU.e(interfaceC13408fZk, interfaceC13174fSv, false, fsj, this);
}
@Override // o.InterfaceC13361fYY
public final int e(int i) {
return this.c.addAndGet(i);
}
@Override // o.InterfaceC13361fYY
public final Throwable b() {
return this.i;
}
@Override // o.InterfaceC13361fYY
public final boolean d() {
return this.e;
}
@Override // o.InterfaceC13361fYY
public final boolean a() {
return this.b;
}
}