Initial commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.google.common.collect;
|
||||
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class AbstractSequentialIterator<T> extends UnmodifiableIterator<T> {
|
||||
private T a;
|
||||
|
||||
protected AbstractSequentialIterator(T t) {
|
||||
this.a = t;
|
||||
}
|
||||
|
||||
protected abstract T a(T t);
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public final boolean hasNext() {
|
||||
return this.a != null;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public final T next() {
|
||||
if (!hasNext()) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
try {
|
||||
return this.a;
|
||||
} finally {
|
||||
this.a = a(this.a);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user