what-the-bank/sources/com/google/android/gms/internal/location/zzbt.java

59 lines
1.4 KiB
Java

package com.google.android.gms.internal.location;
import java.util.NoSuchElementException;
/* loaded from: classes2.dex */
abstract class zzbt extends zzca {
private final int zza;
private int zzb;
/* JADX INFO: Access modifiers changed from: protected */
public zzbt(int i, int i2) {
zzbr.zzb(i2, i, "index");
this.zza = i;
this.zzb = i2;
}
@Override // java.util.Iterator, java.util.ListIterator
public final Object next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
int i = this.zzb;
this.zzb = i + 1;
return zza(i);
}
@Override // java.util.ListIterator
public final Object previous() {
if (!hasPrevious()) {
throw new NoSuchElementException();
}
int i = this.zzb - 1;
this.zzb = i;
return zza(i);
}
protected abstract Object zza(int i);
@Override // java.util.ListIterator
public final int previousIndex() {
return this.zzb - 1;
}
@Override // java.util.ListIterator
public final int nextIndex() {
return this.zzb;
}
@Override // java.util.ListIterator
public final boolean hasPrevious() {
return this.zzb > 0;
}
@Override // java.util.Iterator, java.util.ListIterator
public final boolean hasNext() {
return this.zzb < this.zza;
}
}