what-the-bank/sources/com/google/android/gms/internal/p002firebaseauthapi/zzaet.java

122 lines
3.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.p002firebaseauthapi;
import java.util.Arrays;
import java.util.RandomAccess;
/* loaded from: classes2.dex */
final class zzaet extends zzabn implements RandomAccess {
private static final zzaet zza;
private Object[] zzb;
private int zzc;
static {
zzaet zzaetVar = new zzaet(new Object[0], 0);
zza = zzaetVar;
zzaetVar.zzb();
}
zzaet() {
this(new Object[10], 0);
}
private final String zzf(int i) {
return "Index:" + i + ", Size:" + this.zzc;
}
private final void zzg(int i) {
if (i < 0 || i >= this.zzc) {
throw new IndexOutOfBoundsException(zzf(i));
}
}
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.List
public final void add(int i, Object obj) {
int i2;
zza();
if (i < 0 || i > (i2 = this.zzc)) {
throw new IndexOutOfBoundsException(zzf(i));
}
Object[] objArr = this.zzb;
if (i2 < objArr.length) {
System.arraycopy(objArr, i, objArr, i + 1, i2 - i);
} else {
Object[] objArr2 = new Object[((i2 * 3) / 2) + 1];
System.arraycopy(objArr, 0, objArr2, 0, i);
System.arraycopy(this.zzb, i, objArr2, i + 1, this.zzc - i);
this.zzb = objArr2;
}
this.zzb[i] = obj;
this.zzc++;
this.modCount++;
}
@Override // java.util.AbstractList, java.util.List
public final Object get(int i) {
zzg(i);
return this.zzb[i];
}
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.List
public final Object remove(int i) {
zza();
zzg(i);
Object[] objArr = this.zzb;
Object obj = objArr[i];
if (i < this.zzc - 1) {
System.arraycopy(objArr, i + 1, objArr, i, (r2 - i) - 1);
}
this.zzc--;
this.modCount++;
return obj;
}
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.List
public final Object set(int i, Object obj) {
zza();
zzg(i);
Object[] objArr = this.zzb;
Object obj2 = objArr[i];
objArr[i] = obj;
this.modCount++;
return obj2;
}
private zzaet(Object[] objArr, int i) {
this.zzb = objArr;
this.zzc = i;
}
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzadk
public final /* synthetic */ zzadk zzd(int i) {
if (i < this.zzc) {
throw new IllegalArgumentException();
}
return new zzaet(Arrays.copyOf(this.zzb, i), this.zzc);
}
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public final boolean add(Object obj) {
zza();
int i = this.zzc;
Object[] objArr = this.zzb;
if (i == objArr.length) {
this.zzb = Arrays.copyOf(objArr, ((i * 3) / 2) + 1);
}
Object[] objArr2 = this.zzb;
int i2 = this.zzc;
this.zzc = i2 + 1;
objArr2[i2] = obj;
this.modCount++;
return true;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public final int size() {
return this.zzc;
}
public static zzaet zze() {
return zza;
}
}