package com.google.android.gms.internal.p002firebaseauthapi; import java.util.AbstractSet; import java.util.Iterator; import java.util.Map; /* loaded from: classes2.dex */ final class zzafh extends AbstractSet { final zzafj zza; /* JADX INFO: Access modifiers changed from: package-private */ public /* synthetic */ zzafh(zzafj zzafjVar, zzafg zzafgVar) { this.zza = zzafjVar; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public final /* synthetic */ boolean add(Object obj) { Map.Entry entry = (Map.Entry) obj; if (contains(entry)) { return false; } this.zza.put((Comparable) entry.getKey(), entry.getValue()); return true; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public final void clear() { this.zza.clear(); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public final boolean contains(Object obj) { Map.Entry entry = (Map.Entry) obj; Object obj2 = this.zza.get(entry.getKey()); Object value = entry.getValue(); return obj2 == value || (obj2 != null && obj2.equals(value)); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public final boolean remove(Object obj) { Map.Entry entry = (Map.Entry) obj; if (!contains(entry)) { return false; } this.zza.remove(entry.getKey()); return true; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public final int size() { return this.zza.size(); } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public final Iterator iterator() { return new zzaff(this.zza, null); } }