what-the-bank/sources/com/google/android/libraries/places/internal/zzim.java

59 lines
1.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.libraries.places.internal;
import java.util.NoSuchElementException;
/* loaded from: classes2.dex */
abstract class zzim extends zzjw {
private final int zza;
private int zzb;
/* JADX INFO: Access modifiers changed from: protected */
public zzim(int i, int i2) {
zzig.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;
}
}