mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-13 09:27:16 +01:00
94 lines
3.7 KiB
Java
94 lines
3.7 KiB
Java
package androidx.compose.runtime;
|
|
|
|
import androidx.compose.runtime.internal.StabilityInferred;
|
|
import com.amazon.alexa.ra.core.data.fragments.SmartFragmentContent;
|
|
import com.amazon.alexa.voice.ui.ra.RaUiOptions;
|
|
import com.dee.app.metrics.MetricsConstants;
|
|
import java.util.Arrays;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.JvmField;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@StabilityInferred(parameters = 0)
|
|
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u0015\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\b\n\u0002\u0010\u000b\n\u0002\b\u0004\b\u0001\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\b\u0010\u000b\u001a\u00020\u0005H\u0002J\u000e\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u0007J\u0006\u0010\u000f\u001a\u00020\u0007J\u000e\u0010\u0010\u001a\u00020\u00072\u0006\u0010\u0011\u001a\u00020\u0007J\u0006\u0010\u0012\u001a\u00020\u0007J\u0006\u0010\u0013\u001a\u00020\u0007J\u000e\u0010\u0012\u001a\u00020\u00072\u0006\u0010\u0014\u001a\u00020\u0007J\t\u0010\u0015\u001a\u00020\u0016H\u0086\bJ\t\u0010\u0017\u001a\u00020\u0016H\u0086\bJ\u0006\u0010\u0018\u001a\u00020\rJ\u000e\u0010\u0019\u001a\u00020\u00072\u0006\u0010\u000e\u001a\u00020\u0007R\u0012\u0010\u0004\u001a\u00020\u00058\u0000@\u0000X\u0081\u000e¢\u0006\u0002\n\u0000R\u0012\u0010\u0006\u001a\u00020\u00078\u0000@\u0000X\u0081\u000e¢\u0006\u0002\n\u0000R\u0012\u0010\b\u001a\u00020\u00078Æ\u0002¢\u0006\u0006\u001a\u0004\b\t\u0010\n¨\u0006\u001a"}, d2 = {"Landroidx/compose/runtime/IntStack;", "", "<init>", "()V", "slots", "", "tos", "", "size", "getSize", "()I", "resize", "push", "", "value", "pop", "peekOr", "default", RaUiOptions.ENTER_ANIMATION_PEEK, "peek2", "index", "isEmpty", "", "isNotEmpty", MetricsConstants.Method.CACHE_CLEAR, "indexOf", SmartFragmentContent.RUNTIME}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
/* loaded from: classes13.dex */
|
|
public final class IntStack {
|
|
public static final int $stable = 8;
|
|
|
|
@JvmField
|
|
@NotNull
|
|
public int[] slots = new int[10];
|
|
|
|
@JvmField
|
|
public int tos;
|
|
|
|
private final int[] resize() {
|
|
int[] iArr = this.slots;
|
|
int[] copyOf = Arrays.copyOf(iArr, iArr.length * 2);
|
|
this.slots = copyOf;
|
|
return copyOf;
|
|
}
|
|
|
|
public final void clear() {
|
|
this.tos = 0;
|
|
}
|
|
|
|
/* renamed from: getSize, reason: from getter */
|
|
public final int getTos() {
|
|
return this.tos;
|
|
}
|
|
|
|
public final int indexOf(int value) {
|
|
int[] iArr = this.slots;
|
|
int min = Math.min(iArr.length, this.tos);
|
|
for (int i = 0; i < min; i++) {
|
|
if (iArr[i] == value) {
|
|
return i;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public final boolean isEmpty() {
|
|
return this.tos == 0;
|
|
}
|
|
|
|
public final boolean isNotEmpty() {
|
|
return this.tos != 0;
|
|
}
|
|
|
|
public final int peek() {
|
|
return this.slots[this.tos - 1];
|
|
}
|
|
|
|
public final int peek2() {
|
|
return this.slots[this.tos - 2];
|
|
}
|
|
|
|
public final int peekOr(int r2) {
|
|
int i = this.tos - 1;
|
|
return i >= 0 ? this.slots[i] : r2;
|
|
}
|
|
|
|
public final int pop() {
|
|
int[] iArr = this.slots;
|
|
int i = this.tos - 1;
|
|
this.tos = i;
|
|
return iArr[i];
|
|
}
|
|
|
|
public final void push(int value) {
|
|
int[] iArr = this.slots;
|
|
if (this.tos >= iArr.length) {
|
|
iArr = resize();
|
|
}
|
|
int i = this.tos;
|
|
this.tos = i + 1;
|
|
iArr[i] = value;
|
|
}
|
|
|
|
public final int peek(int index) {
|
|
return this.slots[index];
|
|
}
|
|
}
|