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

96 lines
2.6 KiB
Java

package o;
import java.util.Objects;
/* renamed from: o.fWc, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C13294fWc<T> extends AbstractC13163fSk<T> {
private T[] e;
public C13294fWc(T[] tArr) {
this.e = tArr;
}
@Override // o.AbstractC13163fSk
public final void subscribeActual(InterfaceC13174fSv<? super T> interfaceC13174fSv) {
RVV rvv = new RVV(interfaceC13174fSv, this.e);
interfaceC13174fSv.onSubscribe(rvv);
if (rvv.e) {
return;
}
T[] tArr = rvv.b;
int length = tArr.length;
for (int i = 0; i < length && !rvv.isDisposed(); i++) {
T t = tArr[i];
if (t == null) {
InterfaceC13174fSv<? super T> interfaceC13174fSv2 = rvv.d;
StringBuilder sb = new StringBuilder("The element at index ");
sb.append(i);
sb.append(" is null");
interfaceC13174fSv2.onError(new NullPointerException(sb.toString()));
return;
}
rvv.d.onNext(t);
}
if (rvv.isDisposed()) {
return;
}
rvv.d.onComplete();
}
/* renamed from: o.fWc$RVV */
/* loaded from: classes6.dex */
static final class RVV<T> extends fTJ<T> {
private volatile boolean a;
final T[] b;
private int c;
final InterfaceC13174fSv<? super T> d;
boolean e;
RVV(InterfaceC13174fSv<? super T> interfaceC13174fSv, T[] tArr) {
this.d = interfaceC13174fSv;
this.b = tArr;
}
@Override // o.InterfaceC13414fZq
public final T b() {
int i = this.c;
T[] tArr = this.b;
if (i == tArr.length) {
return null;
}
this.c = i + 1;
return (T) Objects.requireNonNull(tArr[i], "The array element is null");
}
@Override // o.InterfaceC13414fZq
public final boolean c() {
return this.c == this.b.length;
}
@Override // o.InterfaceC13414fZq
public final void e() {
this.c = this.b.length;
}
@Override // o.InterfaceC13413fZp
public final int b(int i) {
if ((i & 1) == 0) {
return 0;
}
this.e = true;
return 1;
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.a;
}
@Override // o.fSJ
public final void dispose() {
this.a = true;
}
}
}