package com.applovin.impl; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.Map; import java.util.Set; /* loaded from: classes.dex */ public abstract class hb extends b2 implements Serializable { final transient gb d; final transient int f; @Override // com.applovin.impl.h public Map b() { throw new AssertionError("should never be called"); } @Override // com.applovin.impl.h public Set c() { throw new AssertionError("unreachable"); } @Override // com.applovin.impl.uf public void clear() { throw new UnsupportedOperationException(); } @Override // com.applovin.impl.h, com.applovin.impl.uf /* renamed from: g, reason: merged with bridge method [inline-methods] */ public gb a() { return this.d; } @Override // com.applovin.impl.h /* renamed from: h, reason: merged with bridge method [inline-methods] */ public cb d() { return new c(this); } @Override // com.applovin.impl.h /* renamed from: i, reason: merged with bridge method [inline-methods] */ public pp f() { return new a(); } @Override // com.applovin.impl.uf public boolean put(Object obj, Object obj2) { throw new UnsupportedOperationException(); } @Override // com.applovin.impl.uf public int size() { return this.f; } @Override // com.applovin.impl.h public /* bridge */ /* synthetic */ boolean equals(Object obj) { return super.equals(obj); } @Override // com.applovin.impl.h public /* bridge */ /* synthetic */ int hashCode() { return super.hashCode(); } @Override // com.applovin.impl.h public /* bridge */ /* synthetic */ String toString() { return super.toString(); } public static class b { Map a = mh.a(); Comparator b; Comparator c; public Collection b() { return new ArrayList(); } public hb a() { Collection entrySet = this.a.entrySet(); Comparator comparator = this.b; if (comparator != null) { entrySet = wg.a(comparator).b().a(entrySet); } return fb.a(entrySet, this.c); } public b a(Object obj, Iterable iterable) { if (obj != null) { Collection collection = (Collection) this.a.get(obj); if (collection != null) { for (Object obj2 : iterable) { p3.a(obj, obj2); collection.add(obj2); } return this; } Iterator it = iterable.iterator(); if (!it.hasNext()) { return this; } Collection b = b(); while (it.hasNext()) { Object next = it.next(); p3.a(obj, next); b.add(next); } this.a.put(obj, b); return this; } throw new NullPointerException("null key in entry: null=" + wb.d(iterable)); } public b a(Object obj, Object... objArr) { return a(obj, Arrays.asList(objArr)); } } public hb(gb gbVar, int i) { this.d = gbVar; this.f = i; } @Override // com.applovin.impl.h public boolean a(Object obj) { return obj != null && super.a(obj); } @Override // com.applovin.impl.h, com.applovin.impl.uf /* renamed from: j, reason: merged with bridge method [inline-methods] */ public cb values() { return (cb) super.values(); } public class a extends pp { Iterator a; Iterator b = xb.a(); public a() { this.a = hb.this.d.values().iterator(); } @Override // java.util.Iterator public boolean hasNext() { return this.b.hasNext() || this.a.hasNext(); } @Override // java.util.Iterator public Object next() { if (!this.b.hasNext()) { this.b = ((cb) this.a.next()).iterator(); } return this.b.next(); } } public static final class c extends cb { private final transient hb b; public c(hb hbVar) { this.b = hbVar; } @Override // com.applovin.impl.cb, java.util.AbstractCollection, java.util.Collection public boolean contains(Object obj) { return this.b.a(obj); } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable public pp iterator() { return this.b.f(); } @Override // com.applovin.impl.cb public int a(Object[] objArr, int i) { pp it = this.b.d.values().iterator(); while (it.hasNext()) { i = ((cb) it.next()).a(objArr, i); } return i; } @Override // java.util.AbstractCollection, java.util.Collection public int size() { return this.b.size(); } } }