Files
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

224 lines
6.9 KiB
Java

package com.fyber.inneractive.sdk.protobuf;
import com.fyber.inneractive.sdk.protobuf.y;
import java.nio.charset.Charset;
import java.util.AbstractList;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;
/* loaded from: classes2.dex */
public final class n extends c<Double> implements y.b, RandomAccess, x0 {
public static final n d;
public double[] b;
public int c;
static {
n nVar = new n(new double[0], 0);
d = nVar;
nVar.a = false;
}
public n() {
this(new double[10], 0);
}
@Override // java.util.AbstractList, java.util.List
public final void add(int i, Object obj) {
int i2;
double doubleValue = ((Double) obj).doubleValue();
e();
if (i < 0 || i > (i2 = this.c)) {
StringBuilder a = com.fyber.inneractive.sdk.bidder.h.a("Index:", i, ", Size:");
a.append(this.c);
throw new IndexOutOfBoundsException(a.toString());
}
double[] dArr = this.b;
if (i2 < dArr.length) {
System.arraycopy(dArr, i, dArr, i + 1, i2 - i);
} else {
double[] dArr2 = new double[((i2 * 3) / 2) + 1];
System.arraycopy(dArr, 0, dArr2, 0, i);
System.arraycopy(this.b, i, dArr2, i + 1, this.c - i);
this.b = dArr2;
}
this.b[i] = doubleValue;
this.c++;
((AbstractList) this).modCount++;
}
@Override // com.fyber.inneractive.sdk.protobuf.c, java.util.AbstractCollection, java.util.Collection, java.util.List
public final boolean addAll(Collection<? extends Double> collection) {
e();
Charset charset = y.a;
collection.getClass();
if (!(collection instanceof n)) {
return super.addAll(collection);
}
n nVar = (n) collection;
int i = nVar.c;
if (i == 0) {
return false;
}
int i2 = this.c;
if (Integer.MAX_VALUE - i2 < i) {
throw new OutOfMemoryError();
}
int i3 = i2 + i;
double[] dArr = this.b;
if (i3 > dArr.length) {
this.b = Arrays.copyOf(dArr, i3);
}
System.arraycopy(nVar.b, 0, this.b, this.c, nVar.c);
this.c = i3;
((AbstractList) this).modCount++;
return true;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public final boolean contains(Object obj) {
return indexOf(obj) != -1;
}
@Override // com.fyber.inneractive.sdk.protobuf.c, java.util.AbstractList, java.util.Collection, java.util.List
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof n)) {
return super.equals(obj);
}
n nVar = (n) obj;
if (this.c != nVar.c) {
return false;
}
double[] dArr = nVar.b;
for (int i = 0; i < this.c; i++) {
if (Double.doubleToLongBits(this.b[i]) != Double.doubleToLongBits(dArr[i])) {
return false;
}
}
return true;
}
@Override // java.util.AbstractList, java.util.List
public final int indexOf(Object obj) {
if (!(obj instanceof Double)) {
return -1;
}
double doubleValue = ((Double) obj).doubleValue();
int i = this.c;
for (int i2 = 0; i2 < i; i2++) {
if (this.b[i2] == doubleValue) {
return i2;
}
}
return -1;
}
@Override // com.fyber.inneractive.sdk.protobuf.c, java.util.AbstractList, java.util.List
public final Object remove(int i) {
int i2;
e();
if (i < 0 || i >= (i2 = this.c)) {
StringBuilder a = com.fyber.inneractive.sdk.bidder.h.a("Index:", i, ", Size:");
a.append(this.c);
throw new IndexOutOfBoundsException(a.toString());
}
double[] dArr = this.b;
double d2 = dArr[i];
if (i < i2 - 1) {
System.arraycopy(dArr, i + 1, dArr, i, (i2 - i) - 1);
}
this.c--;
((AbstractList) this).modCount++;
return Double.valueOf(d2);
}
@Override // java.util.AbstractList
public final void removeRange(int i, int i2) {
e();
if (i2 < i) {
throw new IndexOutOfBoundsException("toIndex < fromIndex");
}
double[] dArr = this.b;
System.arraycopy(dArr, i2, dArr, i, this.c - i2);
this.c -= i2 - i;
((AbstractList) this).modCount++;
}
@Override // java.util.AbstractList, java.util.List
public final Object set(int i, Object obj) {
double doubleValue = ((Double) obj).doubleValue();
e();
if (i < 0 || i >= this.c) {
StringBuilder a = com.fyber.inneractive.sdk.bidder.h.a("Index:", i, ", Size:");
a.append(this.c);
throw new IndexOutOfBoundsException(a.toString());
}
double[] dArr = this.b;
double d2 = dArr[i];
dArr[i] = doubleValue;
return Double.valueOf(d2);
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public final int size() {
return this.c;
}
public n(double[] dArr, int i) {
this.b = dArr;
this.c = i;
}
public final void a(double d2) {
e();
int i = this.c;
double[] dArr = this.b;
if (i == dArr.length) {
double[] dArr2 = new double[((i * 3) / 2) + 1];
System.arraycopy(dArr, 0, dArr2, 0, i);
this.b = dArr2;
}
double[] dArr3 = this.b;
int i2 = this.c;
this.c = i2 + 1;
dArr3[i2] = d2;
}
@Override // java.util.AbstractList, java.util.List
public final Object get(int i) {
if (i >= 0 && i < this.c) {
return Double.valueOf(this.b[i]);
}
StringBuilder a = com.fyber.inneractive.sdk.bidder.h.a("Index:", i, ", Size:");
a.append(this.c);
throw new IndexOutOfBoundsException(a.toString());
}
@Override // com.fyber.inneractive.sdk.protobuf.c, java.util.AbstractList, java.util.Collection, java.util.List
public final int hashCode() {
int i = 1;
for (int i2 = 0; i2 < this.c; i2++) {
i = (i * 31) + y.a(Double.doubleToLongBits(this.b[i2]));
}
return i;
}
@Override // com.fyber.inneractive.sdk.protobuf.y.j
/* renamed from: c, reason: merged with bridge method [inline-methods] */
public final n a(int i) {
if (i >= this.c) {
return new n(Arrays.copyOf(this.b, i), this.c);
}
throw new IllegalArgumentException();
}
@Override // com.fyber.inneractive.sdk.protobuf.c, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public final boolean add(Object obj) {
a(((Double) obj).doubleValue());
return true;
}
}