- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
44 lines
1.1 KiB
Java
44 lines
1.1 KiB
Java
package kotlin.jvm.internal;
|
|
|
|
import java.util.Iterator;
|
|
import java.util.NoSuchElementException;
|
|
import kotlin.jvm.internal.markers.KMappedMarker;
|
|
|
|
/* loaded from: classes5.dex */
|
|
final class ArrayIterator<T> implements Iterator<T>, KMappedMarker {
|
|
private final T[] array;
|
|
private int index;
|
|
|
|
public final T[] getArray() {
|
|
return this.array;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public void remove() {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
|
|
public ArrayIterator(T[] array) {
|
|
Intrinsics.checkNotNullParameter(array, "array");
|
|
this.array = array;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public boolean hasNext() {
|
|
return this.index < this.array.length;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public T next() {
|
|
try {
|
|
T[] tArr = this.array;
|
|
int i = this.index;
|
|
this.index = i + 1;
|
|
return tArr[i];
|
|
} catch (ArrayIndexOutOfBoundsException e) {
|
|
this.index--;
|
|
throw new NoSuchElementException(e.getMessage());
|
|
}
|
|
}
|
|
}
|