Files
rr3-apk/decompiled/sources/androidx/collection/IndexBasedArrayIterator.java
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

51 lines
1.5 KiB
Java

package androidx.collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableIterator;
@SourceDebugExtension({"SMAP\nIndexBasedArrayIterator.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IndexBasedArrayIterator.kt\nandroidx/collection/IndexBasedArrayIterator\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,48:1\n1#2:49\n*E\n"})
/* loaded from: classes.dex */
public abstract class IndexBasedArrayIterator<T> implements Iterator<T>, KMutableIterator {
private boolean canRemove;
private int index;
private int size;
public abstract T elementAt(int i);
@Override // java.util.Iterator
public boolean hasNext() {
return this.index < this.size;
}
public abstract void removeAt(int i);
public IndexBasedArrayIterator(int i) {
this.size = i;
}
@Override // java.util.Iterator
public T next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
T elementAt = elementAt(this.index);
this.index++;
this.canRemove = true;
return elementAt;
}
@Override // java.util.Iterator
public void remove() {
if (!this.canRemove) {
throw new IllegalStateException("Call next() before removing an element.".toString());
}
int i = this.index - 1;
this.index = i;
removeAt(i);
this.size--;
this.canRemove = false;
}
}