96 lines
2.6 KiB
Java
96 lines
2.6 KiB
Java
package o;
|
|
|
|
import java.util.NoSuchElementException;
|
|
|
|
/* renamed from: o.fXg, reason: case insensitive filesystem */
|
|
/* loaded from: classes.dex */
|
|
public final class C13333fXg<T> extends AbstractC13175fSw<T> {
|
|
private InterfaceC13169fSq<? extends T> b;
|
|
private T e;
|
|
|
|
public C13333fXg(InterfaceC13169fSq<? extends T> interfaceC13169fSq, T t) {
|
|
this.b = interfaceC13169fSq;
|
|
this.e = t;
|
|
}
|
|
|
|
@Override // o.AbstractC13175fSw
|
|
public final void e(InterfaceC13176fSx<? super T> interfaceC13176fSx) {
|
|
this.b.subscribe(new IeS(interfaceC13176fSx, this.e));
|
|
}
|
|
|
|
/* renamed from: o.fXg$IeS */
|
|
/* loaded from: classes6.dex */
|
|
static final class IeS<T> implements InterfaceC13174fSv<T>, fSJ {
|
|
private boolean a;
|
|
private T b;
|
|
private InterfaceC13176fSx<? super T> c;
|
|
private fSJ d;
|
|
private T e;
|
|
|
|
IeS(InterfaceC13176fSx<? super T> interfaceC13176fSx, T t) {
|
|
this.c = interfaceC13176fSx;
|
|
this.b = t;
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onSubscribe(fSJ fsj) {
|
|
if (EnumC13192fTf.d(this.d, fsj)) {
|
|
this.d = fsj;
|
|
this.c.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.a) {
|
|
return;
|
|
}
|
|
if (this.e == null) {
|
|
this.e = t;
|
|
return;
|
|
}
|
|
this.a = true;
|
|
this.d.dispose();
|
|
this.c.onError(new IllegalArgumentException("Sequence contains more than one element!"));
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onError(Throwable th) {
|
|
if (this.a) {
|
|
C13418fZu.c(th);
|
|
} else {
|
|
this.a = true;
|
|
this.c.onError(th);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onComplete() {
|
|
if (this.a) {
|
|
return;
|
|
}
|
|
this.a = true;
|
|
T t = this.e;
|
|
this.e = null;
|
|
if (t == null) {
|
|
t = this.b;
|
|
}
|
|
if (t != null) {
|
|
this.c.e(t);
|
|
} else {
|
|
this.c.onError(new NoSuchElementException());
|
|
}
|
|
}
|
|
}
|
|
}
|