Files
rr3-apk/decompiled-community/sources/kotlin/jvm/internal/PrimitiveSpreadBuilder.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

76 lines
2.1 KiB
Java

package kotlin.jvm.internal;
import kotlin.collections.IntIterator;
import kotlin.ranges.IntRange;
/* loaded from: classes5.dex */
public abstract class PrimitiveSpreadBuilder<T> {
private int position;
private final int size;
private final T[] spreads;
private static /* synthetic */ void getSpreads$annotations() {
}
public final int getPosition() {
return this.position;
}
public abstract int getSize(T t);
public final void setPosition(int i) {
this.position = i;
}
public PrimitiveSpreadBuilder(int i) {
this.size = i;
this.spreads = (T[]) new Object[i];
}
public final void addSpread(T spreadArgument) {
Intrinsics.checkNotNullParameter(spreadArgument, "spreadArgument");
T[] tArr = this.spreads;
int i = this.position;
this.position = i + 1;
tArr[i] = spreadArgument;
}
public final int size() {
int i = 0;
IntIterator it = new IntRange(0, this.size - 1).iterator();
while (it.hasNext()) {
T t = this.spreads[it.nextInt()];
i += t != null ? getSize(t) : 1;
}
return i;
}
public final T toArray(T values, T result) {
Intrinsics.checkNotNullParameter(values, "values");
Intrinsics.checkNotNullParameter(result, "result");
IntIterator it = new IntRange(0, this.size - 1).iterator();
int i = 0;
int i2 = 0;
while (it.hasNext()) {
int nextInt = it.nextInt();
T t = this.spreads[nextInt];
if (t != null) {
if (i < nextInt) {
int i3 = nextInt - i;
System.arraycopy(values, i, result, i2, i3);
i2 += i3;
}
int size = getSize(t);
System.arraycopy(t, 0, result, i2, size);
i2 += size;
i = nextInt + 1;
}
}
int i4 = this.size;
if (i < i4) {
System.arraycopy(values, i, result, i2, i4 - i);
}
return result;
}
}