70 lines
2.2 KiB
Java
70 lines
2.2 KiB
Java
|
package o;
|
||
|
|
||
|
import java.util.Objects;
|
||
|
import java.util.Optional;
|
||
|
|
||
|
/* renamed from: o.fTz, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class C13212fTz<T, R> extends AbstractC13163fSk<R> {
|
||
|
private AbstractC13163fSk<T> c;
|
||
|
private fSS<? super T, Optional<? extends R>> d;
|
||
|
|
||
|
public C13212fTz(AbstractC13163fSk<T> abstractC13163fSk, fSS<? super T, Optional<? extends R>> fss) {
|
||
|
this.c = abstractC13163fSk;
|
||
|
this.d = fss;
|
||
|
}
|
||
|
|
||
|
@Override // o.AbstractC13163fSk
|
||
|
public final void subscribeActual(InterfaceC13174fSv<? super R> interfaceC13174fSv) {
|
||
|
this.c.subscribe(new LWm(interfaceC13174fSv, this.d));
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.fTz$LWm */
|
||
|
/* loaded from: classes6.dex */
|
||
|
static final class LWm<T, R> extends fTA<T, R> {
|
||
|
private fSS<? super T, Optional<? extends R>> a;
|
||
|
|
||
|
LWm(InterfaceC13174fSv<? super R> interfaceC13174fSv, fSS<? super T, Optional<? extends R>> fss) {
|
||
|
super(interfaceC13174fSv);
|
||
|
this.a = fss;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC13174fSv
|
||
|
public final void onNext(T t) {
|
||
|
if (this.c) {
|
||
|
return;
|
||
|
}
|
||
|
if (this.b != 0) {
|
||
|
this.d.onNext(null);
|
||
|
return;
|
||
|
}
|
||
|
try {
|
||
|
Optional optional = (Optional) Objects.requireNonNull(this.a.a(t), "The mapper returned a null Optional");
|
||
|
if (optional.isPresent()) {
|
||
|
this.d.onNext((Object) optional.get());
|
||
|
}
|
||
|
} catch (Throwable th) {
|
||
|
b(th);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC13413fZp
|
||
|
public final int b(int i) {
|
||
|
return e(i);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC13414fZq
|
||
|
public final R b() throws Throwable {
|
||
|
Optional optional;
|
||
|
do {
|
||
|
T b = this.e.b();
|
||
|
if (b == null) {
|
||
|
return null;
|
||
|
}
|
||
|
optional = (Optional) Objects.requireNonNull(this.a.a(b), "The mapper returned a null Optional");
|
||
|
} while (!optional.isPresent());
|
||
|
return (R) optional.get();
|
||
|
}
|
||
|
}
|
||
|
}
|