- 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
51 lines
1.5 KiB
Java
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;
|
|
}
|
|
}
|