what-the-bank/sources/com/google/android/gms/internal/vision/zzgn.java

177 lines
5.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.vision;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.RandomAccess;
/* loaded from: classes2.dex */
public final class zzgn extends zzef<String> implements zzgo, RandomAccess {
private static final zzgn zzyk;
private static final zzgo zzyl;
private final List<Object> zzym;
public zzgn() {
this(10);
}
public zzgn(int i) {
this((ArrayList<Object>) new ArrayList(i));
}
private zzgn(ArrayList<Object> arrayList) {
this.zzym = arrayList;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public final int size() {
return this.zzym.size();
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractCollection, java.util.Collection, java.util.List
public final boolean addAll(Collection<? extends String> collection) {
return addAll(size(), collection);
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractList, java.util.List
public final boolean addAll(int i, Collection<? extends String> collection) {
zzcj();
if (collection instanceof zzgo) {
collection = ((zzgo) collection).zzft();
}
boolean addAll = this.zzym.addAll(i, collection);
this.modCount++;
return addAll;
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public final void clear() {
zzcj();
this.zzym.clear();
this.modCount++;
}
@Override // com.google.android.gms.internal.vision.zzgo
public final void zzc(zzeo zzeoVar) {
zzcj();
this.zzym.add(zzeoVar);
this.modCount++;
}
@Override // com.google.android.gms.internal.vision.zzgo
public final Object getRaw(int i) {
return this.zzym.get(i);
}
private static String zzh(Object obj) {
if (obj instanceof String) {
return (String) obj;
}
if (obj instanceof zzeo) {
return ((zzeo) obj).zzdk();
}
return zzga.zzj((byte[]) obj);
}
@Override // com.google.android.gms.internal.vision.zzgo
public final List<?> zzft() {
return Collections.unmodifiableList(this.zzym);
}
@Override // com.google.android.gms.internal.vision.zzgo
public final zzgo zzfu() {
return zzch() ? new zzir(this) : this;
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractList, java.util.List
public final /* synthetic */ Object set(int i, Object obj) {
zzcj();
return zzh(this.zzym.set(i, (String) obj));
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractCollection, java.util.Collection, java.util.List
public final /* bridge */ /* synthetic */ boolean retainAll(Collection collection) {
return super.retainAll(collection);
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractCollection, java.util.Collection, java.util.List
public final /* bridge */ /* synthetic */ boolean removeAll(Collection collection) {
return super.removeAll(collection);
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractCollection, java.util.Collection, java.util.List
public final /* bridge */ /* synthetic */ boolean remove(Object obj) {
return super.remove(obj);
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractList, java.util.List
public final /* synthetic */ Object remove(int i) {
zzcj();
Object remove = this.zzym.remove(i);
this.modCount++;
return zzh(remove);
}
@Override // com.google.android.gms.internal.vision.zzef, com.google.android.gms.internal.vision.zzge
public final /* bridge */ /* synthetic */ boolean zzch() {
return super.zzch();
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractList, java.util.List
public final /* synthetic */ void add(int i, Object obj) {
zzcj();
this.zzym.add(i, (String) obj);
this.modCount++;
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractList, java.util.Collection, java.util.List
public final /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
@Override // com.google.android.gms.internal.vision.zzef, java.util.AbstractList, java.util.Collection, java.util.List
public final /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.android.gms.internal.vision.zzge
public final /* synthetic */ zzge zzah(int i) {
if (i < size()) {
throw new IllegalArgumentException();
}
ArrayList arrayList = new ArrayList(i);
arrayList.addAll(this.zzym);
return new zzgn((ArrayList<Object>) arrayList);
}
@Override // java.util.AbstractList, java.util.List
public final /* synthetic */ Object get(int i) {
Object obj = this.zzym.get(i);
if (obj instanceof String) {
return (String) obj;
}
if (obj instanceof zzeo) {
zzeo zzeoVar = (zzeo) obj;
String zzdk = zzeoVar.zzdk();
if (zzeoVar.zzdl()) {
this.zzym.set(i, zzdk);
}
return zzdk;
}
byte[] bArr = (byte[]) obj;
String zzj = zzga.zzj(bArr);
if (zzga.zzi(bArr)) {
this.zzym.set(i, zzj);
}
return zzj;
}
static {
zzgn zzgnVar = new zzgn();
zzyk = zzgnVar;
zzgnVar.zzci();
zzyl = zzgnVar;
}
}