- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
79 lines
2.4 KiB
Java
79 lines
2.4 KiB
Java
package kotlin.collections.builders;
|
|
|
|
import com.ironsource.v8;
|
|
import java.util.Arrays;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class ListBuilderKt {
|
|
public static final Object[] arrayOfUninitializedElements(int i) {
|
|
if (i < 0) {
|
|
throw new IllegalArgumentException("capacity must be non-negative.".toString());
|
|
}
|
|
return new Object[i];
|
|
}
|
|
|
|
public static final String subarrayContentToString(Object[] objArr, int i, int i2, Collection collection) {
|
|
StringBuilder sb = new StringBuilder((i2 * 3) + 2);
|
|
sb.append(v8.i.d);
|
|
for (int i3 = 0; i3 < i2; i3++) {
|
|
if (i3 > 0) {
|
|
sb.append(", ");
|
|
}
|
|
Object obj = objArr[i + i3];
|
|
if (obj == collection) {
|
|
sb.append("(this Collection)");
|
|
} else {
|
|
sb.append(obj);
|
|
}
|
|
}
|
|
sb.append(v8.i.e);
|
|
String sb2 = sb.toString();
|
|
Intrinsics.checkNotNullExpressionValue(sb2, "toString(...)");
|
|
return sb2;
|
|
}
|
|
|
|
public static final int subarrayContentHashCode(Object[] objArr, int i, int i2) {
|
|
int i3 = 1;
|
|
for (int i4 = 0; i4 < i2; i4++) {
|
|
Object obj = objArr[i + i4];
|
|
i3 = (i3 * 31) + (obj != null ? obj.hashCode() : 0);
|
|
}
|
|
return i3;
|
|
}
|
|
|
|
public static final boolean subarrayContentEquals(Object[] objArr, int i, int i2, List list) {
|
|
if (i2 != list.size()) {
|
|
return false;
|
|
}
|
|
for (int i3 = 0; i3 < i2; i3++) {
|
|
if (!Intrinsics.areEqual(objArr[i + i3], list.get(i3))) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static final Object[] copyOfUninitializedElements(Object[] objArr, int i) {
|
|
Intrinsics.checkNotNullParameter(objArr, "<this>");
|
|
Object[] copyOf = Arrays.copyOf(objArr, i);
|
|
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
|
|
return copyOf;
|
|
}
|
|
|
|
public static final void resetAt(Object[] objArr, int i) {
|
|
Intrinsics.checkNotNullParameter(objArr, "<this>");
|
|
objArr[i] = null;
|
|
}
|
|
|
|
public static final void resetRange(Object[] objArr, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(objArr, "<this>");
|
|
while (i < i2) {
|
|
resetAt(objArr, i);
|
|
i++;
|
|
}
|
|
}
|
|
}
|