44 lines
894 B
Java
44 lines
894 B
Java
|
package o;
|
||
|
|
||
|
import java.util.Iterator;
|
||
|
import java.util.NoSuchElementException;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public abstract class ApF<T> implements Iterator<T> {
|
||
|
public boolean a;
|
||
|
public T b;
|
||
|
public boolean e;
|
||
|
|
||
|
protected abstract void b();
|
||
|
|
||
|
@Override // java.util.Iterator
|
||
|
public boolean hasNext() {
|
||
|
if (!this.e) {
|
||
|
b();
|
||
|
this.e = true;
|
||
|
}
|
||
|
return this.a;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Iterator
|
||
|
public T next() {
|
||
|
if (!this.e) {
|
||
|
hasNext();
|
||
|
}
|
||
|
if (!this.a) {
|
||
|
throw new NoSuchElementException();
|
||
|
}
|
||
|
T t = this.b;
|
||
|
b();
|
||
|
if (!this.a) {
|
||
|
this.b = null;
|
||
|
}
|
||
|
return t;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.Iterator
|
||
|
public void remove() {
|
||
|
throw new UnsupportedOperationException("remove not supported");
|
||
|
}
|
||
|
}
|