214 lines
6.6 KiB
Java
214 lines
6.6 KiB
Java
|
package com.google.android.gms.internal.p002firebaseauthapi;
|
||
|
|
||
|
import java.util.Arrays;
|
||
|
import java.util.Collection;
|
||
|
import java.util.RandomAccess;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
final class zzabr extends zzabn implements RandomAccess, zzadk, zzaer {
|
||
|
private static final zzabr zza;
|
||
|
private boolean[] zzb;
|
||
|
private int zzc;
|
||
|
|
||
|
static {
|
||
|
zzabr zzabrVar = new zzabr(new boolean[0], 0);
|
||
|
zza = zzabrVar;
|
||
|
zzabrVar.zzb();
|
||
|
}
|
||
|
|
||
|
zzabr() {
|
||
|
this(new boolean[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 /* synthetic */ void add(int i, Object obj) {
|
||
|
int i2;
|
||
|
boolean booleanValue = ((Boolean) obj).booleanValue();
|
||
|
zza();
|
||
|
if (i < 0 || i > (i2 = this.zzc)) {
|
||
|
throw new IndexOutOfBoundsException(zzf(i));
|
||
|
}
|
||
|
boolean[] zArr = this.zzb;
|
||
|
if (i2 < zArr.length) {
|
||
|
System.arraycopy(zArr, i, zArr, i + 1, i2 - i);
|
||
|
} else {
|
||
|
boolean[] zArr2 = new boolean[((i2 * 3) / 2) + 1];
|
||
|
System.arraycopy(zArr, 0, zArr2, 0, i);
|
||
|
System.arraycopy(this.zzb, i, zArr2, i + 1, this.zzc - i);
|
||
|
this.zzb = zArr2;
|
||
|
}
|
||
|
this.zzb[i] = booleanValue;
|
||
|
this.zzc++;
|
||
|
this.modCount++;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractCollection, java.util.Collection, java.util.List
|
||
|
public final boolean addAll(Collection collection) {
|
||
|
zza();
|
||
|
zzadl.zze(collection);
|
||
|
if (!(collection instanceof zzabr)) {
|
||
|
return super.addAll(collection);
|
||
|
}
|
||
|
zzabr zzabrVar = (zzabr) collection;
|
||
|
int i = zzabrVar.zzc;
|
||
|
if (i == 0) {
|
||
|
return false;
|
||
|
}
|
||
|
int i2 = this.zzc;
|
||
|
if (Integer.MAX_VALUE - i2 < i) {
|
||
|
throw new OutOfMemoryError();
|
||
|
}
|
||
|
int i3 = i2 + i;
|
||
|
boolean[] zArr = this.zzb;
|
||
|
if (i3 > zArr.length) {
|
||
|
this.zzb = Arrays.copyOf(zArr, i3);
|
||
|
}
|
||
|
System.arraycopy(zzabrVar.zzb, 0, this.zzb, this.zzc, zzabrVar.zzc);
|
||
|
this.zzc = i3;
|
||
|
this.modCount++;
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
||
|
public final boolean contains(Object obj) {
|
||
|
return indexOf(obj) != -1;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.Collection, java.util.List
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
if (!(obj instanceof zzabr)) {
|
||
|
return super.equals(obj);
|
||
|
}
|
||
|
zzabr zzabrVar = (zzabr) obj;
|
||
|
if (this.zzc != zzabrVar.zzc) {
|
||
|
return false;
|
||
|
}
|
||
|
boolean[] zArr = zzabrVar.zzb;
|
||
|
for (int i = 0; i < this.zzc; i++) {
|
||
|
if (this.zzb[i] != zArr[i]) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.AbstractList, java.util.List
|
||
|
public final /* synthetic */ Object get(int i) {
|
||
|
zzg(i);
|
||
|
return Boolean.valueOf(this.zzb[i]);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.Collection, java.util.List
|
||
|
public final int hashCode() {
|
||
|
int i = 1;
|
||
|
for (int i2 = 0; i2 < this.zzc; i2++) {
|
||
|
i = (i * 31) + zzadl.zza(this.zzb[i2]);
|
||
|
}
|
||
|
return i;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.AbstractList, java.util.List
|
||
|
public final int indexOf(Object obj) {
|
||
|
if (!(obj instanceof Boolean)) {
|
||
|
return -1;
|
||
|
}
|
||
|
boolean booleanValue = ((Boolean) obj).booleanValue();
|
||
|
int i = this.zzc;
|
||
|
for (int i2 = 0; i2 < i; i2++) {
|
||
|
if (this.zzb[i2] == booleanValue) {
|
||
|
return i2;
|
||
|
}
|
||
|
}
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.List
|
||
|
public final /* synthetic */ Object remove(int i) {
|
||
|
zza();
|
||
|
zzg(i);
|
||
|
boolean[] zArr = this.zzb;
|
||
|
boolean z = zArr[i];
|
||
|
if (i < this.zzc - 1) {
|
||
|
System.arraycopy(zArr, i + 1, zArr, i, (r2 - i) - 1);
|
||
|
}
|
||
|
this.zzc--;
|
||
|
this.modCount++;
|
||
|
return Boolean.valueOf(z);
|
||
|
}
|
||
|
|
||
|
@Override // java.util.AbstractList
|
||
|
protected final void removeRange(int i, int i2) {
|
||
|
zza();
|
||
|
if (i2 < i) {
|
||
|
throw new IndexOutOfBoundsException("toIndex < fromIndex");
|
||
|
}
|
||
|
boolean[] zArr = this.zzb;
|
||
|
System.arraycopy(zArr, i2, zArr, i, this.zzc - i2);
|
||
|
this.zzc -= i2 - i;
|
||
|
this.modCount++;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.List
|
||
|
public final /* synthetic */ Object set(int i, Object obj) {
|
||
|
boolean booleanValue = ((Boolean) obj).booleanValue();
|
||
|
zza();
|
||
|
zzg(i);
|
||
|
boolean[] zArr = this.zzb;
|
||
|
boolean z = zArr[i];
|
||
|
zArr[i] = booleanValue;
|
||
|
return Boolean.valueOf(z);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzadk
|
||
|
public final /* synthetic */ zzadk zzd(int i) {
|
||
|
if (i < this.zzc) {
|
||
|
throw new IllegalArgumentException();
|
||
|
}
|
||
|
return new zzabr(Arrays.copyOf(this.zzb, i), this.zzc);
|
||
|
}
|
||
|
|
||
|
public final void zze(boolean z) {
|
||
|
zza();
|
||
|
int i = this.zzc;
|
||
|
boolean[] zArr = this.zzb;
|
||
|
if (i == zArr.length) {
|
||
|
boolean[] zArr2 = new boolean[((i * 3) / 2) + 1];
|
||
|
System.arraycopy(zArr, 0, zArr2, 0, i);
|
||
|
this.zzb = zArr2;
|
||
|
}
|
||
|
boolean[] zArr3 = this.zzb;
|
||
|
int i2 = this.zzc;
|
||
|
this.zzc = i2 + 1;
|
||
|
zArr3[i2] = z;
|
||
|
}
|
||
|
|
||
|
private zzabr(boolean[] zArr, int i) {
|
||
|
this.zzb = zArr;
|
||
|
this.zzc = i;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.p002firebaseauthapi.zzabn, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
||
|
public final /* synthetic */ boolean add(Object obj) {
|
||
|
zze(((Boolean) obj).booleanValue());
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
||
|
public final int size() {
|
||
|
return this.zzc;
|
||
|
}
|
||
|
}
|