34 lines
1014 B
Java
34 lines
1014 B
Java
|
package o;
|
||
|
|
||
|
import java.util.concurrent.atomic.AtomicReferenceArray;
|
||
|
|
||
|
/* renamed from: o.ghf, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class C15117ghf<T> {
|
||
|
public volatile AtomicReferenceArray<T> array;
|
||
|
|
||
|
public C15117ghf(int i) {
|
||
|
this.array = new AtomicReferenceArray<>(i);
|
||
|
}
|
||
|
|
||
|
public final void d(int i, T t) {
|
||
|
AtomicReferenceArray<T> atomicReferenceArray = this.array;
|
||
|
int length = atomicReferenceArray.length();
|
||
|
if (i < length) {
|
||
|
atomicReferenceArray.set(i, t);
|
||
|
return;
|
||
|
}
|
||
|
int i2 = i + 1;
|
||
|
int i3 = length << 1;
|
||
|
if (i2 < i3) {
|
||
|
i2 = i3;
|
||
|
}
|
||
|
AtomicReferenceArray<T> atomicReferenceArray2 = new AtomicReferenceArray<>(i2);
|
||
|
for (int i4 = 0; i4 < length; i4++) {
|
||
|
atomicReferenceArray2.set(i4, atomicReferenceArray.get(i4));
|
||
|
}
|
||
|
atomicReferenceArray2.set(i, t);
|
||
|
this.array = atomicReferenceArray2;
|
||
|
}
|
||
|
}
|