discord-jadx/app/src/main/java/b/g/a/c/i0/b.java

41 lines
911 B
Java
Raw Normal View History

2021-12-21 23:37:30 +00:00
package b.g.a.c.i0;
2021-06-27 20:44:35 +00:00
import java.util.Iterator;
import java.util.NoSuchElementException;
2022-03-02 20:59:20 +00:00
/* compiled from: ArrayIterator.java */
2022-03-08 21:11:21 +00:00
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public class b<T> implements Iterator<T>, Iterable<T> {
2021-12-17 22:03:14 +00:00
public final T[] j;
public int k = 0;
2021-06-27 20:44:35 +00:00
public b(T[] tArr) {
2021-12-17 22:03:14 +00:00
this.j = tArr;
2021-06-27 20:44:35 +00:00
}
@Override // java.util.Iterator
public boolean hasNext() {
2021-12-17 22:03:14 +00:00
return this.k < this.j.length;
2021-06-27 20:44:35 +00:00
}
@Override // java.lang.Iterable
public Iterator<T> iterator() {
return this;
}
@Override // java.util.Iterator
public T next() {
2021-12-17 22:03:14 +00:00
int i = this.k;
T[] tArr = this.j;
2021-06-27 20:44:35 +00:00
if (i < tArr.length) {
2021-12-17 22:03:14 +00:00
this.k = i + 1;
2021-06-27 20:44:35 +00:00
return tArr[i];
}
throw new NoSuchElementException();
}
@Override // java.util.Iterator
public void remove() {
throw new UnsupportedOperationException();
}
}