package ra; import java.io.Serializable; import java.util.AbstractCollection; import java.util.Collection; import java.util.Comparator; import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.NavigableMap; import java.util.NavigableSet; import java.util.RandomAccess; import java.util.Set; import java.util.SortedMap; import java.util.SortedSet; import ra.c0; import ra.f; /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ abstract class d extends f implements Serializable { /* renamed from: n reason: collision with root package name */ private transient Map> f21654n; /* renamed from: o reason: collision with root package name */ private transient int f21655o; /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class a extends d.AbstractC0377d { a() { super(); } @Override // ra.d.AbstractC0377d V b(K k2, V v10) { return v10; } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class b extends d.AbstractC0377d> { b() { super(); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: c */ public Map.Entry b(K k2, V v10) { return c0.c(k2, v10); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ private class c extends c0.f> { /* renamed from: l reason: collision with root package name */ final transient Map> f21658l; /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class a extends c0.c> { a() { } @Override // ra.c0.c Map> a() { return c.this; } @Override // ra.c0.c, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(Object obj) { return j.b(c.this.f21658l.entrySet(), obj); } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public Iterator>> iterator() { return new b(); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean remove(Object obj) { if (!contains(obj)) { return false; } d.q(d.this, ((Map.Entry) obj).getKey()); return true; } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class b implements Iterator>> { /* renamed from: j reason: collision with root package name */ final Iterator>> f21661j; /* renamed from: k reason: collision with root package name */ Collection f21662k; b() { this.f21661j = c.this.f21658l.entrySet().iterator(); } /* renamed from: b */ public Map.Entry> next() { Map.Entry> next = this.f21661j.next(); this.f21662k = next.getValue(); return c.this.e(next); } @Override // java.util.Iterator public boolean hasNext() { return this.f21661j.hasNext(); } @Override // java.util.Iterator public void remove() { i.c(this.f21662k != null); this.f21661j.remove(); d dVar = d.this; d.n(dVar, d.m(dVar) - this.f21662k.size()); this.f21662k.clear(); this.f21662k = null; } } c(Map> map) { this.f21658l = map; } @Override // ra.c0.f protected Set>> a() { return new a(); } /* renamed from: c */ public Collection get(Object obj) { Collection collection = (Collection) c0.g(this.f21658l, obj); if (collection == null) { return null; } return d.this.y(obj, collection); } @Override // java.util.AbstractMap, java.util.Map public void clear() { if (this.f21658l == d.k(d.this)) { d.this.clear(); } else { y.b(new b()); } } @Override // java.util.AbstractMap, java.util.Map public boolean containsKey(Object obj) { return c0.f(this.f21658l, obj); } /* renamed from: d */ public Collection remove(Object obj) { Collection remove = this.f21658l.remove(obj); if (remove == null) { return null; } Collection r10 = d.this.r(); r10.addAll(remove); d dVar = d.this; d.n(dVar, d.m(dVar) - remove.size()); remove.clear(); return r10; } Map.Entry> e(Map.Entry> entry) { K key = entry.getKey(); return c0.c(key, d.this.y(key, entry.getValue())); } @Override // java.util.AbstractMap, java.util.Map public boolean equals(Object obj) { return this == obj || this.f21658l.equals(obj); } @Override // java.util.AbstractMap, java.util.Map public int hashCode() { return this.f21658l.hashCode(); } @Override // java.util.AbstractMap, java.util.Map public Set keySet() { return d.this.i(); } @Override // java.util.AbstractMap, java.util.Map public int size() { return this.f21658l.size(); } @Override // java.util.AbstractMap public String toString() { return this.f21658l.toString(); } } /* compiled from: AbstractMapBasedMultimap.java */ /* renamed from: ra.d$d reason: collision with other inner class name */ /* loaded from: classes4.dex */ private abstract class AbstractC0377d implements Iterator { /* renamed from: j reason: collision with root package name */ final Iterator>> f21664j; /* renamed from: k reason: collision with root package name */ K f21665k = null; /* renamed from: l reason: collision with root package name */ Collection f21666l = null; /* renamed from: m reason: collision with root package name */ Iterator f21667m = y.f(); AbstractC0377d() { this.f21664j = (Iterator>) d.k(d.this).entrySet().iterator(); } abstract T b(K k2, V v10); @Override // java.util.Iterator public boolean hasNext() { return this.f21664j.hasNext() || this.f21667m.hasNext(); } @Override // java.util.Iterator public T next() { if (!this.f21667m.hasNext()) { Map.Entry> next = this.f21664j.next(); this.f21665k = next.getKey(); Collection value = next.getValue(); this.f21666l = value; this.f21667m = value.iterator(); } return b(this.f21665k, this.f21667m.next()); } @Override // java.util.Iterator public void remove() { this.f21667m.remove(); if (this.f21666l.isEmpty()) { this.f21664j.remove(); } d.p(d.this); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ private class e extends c0.d> { /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class a implements Iterator { /* renamed from: j reason: collision with root package name */ Map.Entry> f21670j; /* renamed from: k reason: collision with root package name */ final /* synthetic */ Iterator f21671k; a(Iterator it) { this.f21671k = it; } @Override // java.util.Iterator public boolean hasNext() { return this.f21671k.hasNext(); } @Override // java.util.Iterator public K next() { Map.Entry> entry = (Map.Entry) this.f21671k.next(); this.f21670j = entry; return entry.getKey(); } @Override // java.util.Iterator public void remove() { i.c(this.f21670j != null); Collection value = this.f21670j.getValue(); this.f21671k.remove(); d dVar = d.this; d.n(dVar, d.m(dVar) - value.size()); value.clear(); this.f21670j = null; } } e(Map> map) { super(map); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public void clear() { y.b(iterator()); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean containsAll(Collection collection) { return a().keySet().containsAll(collection); } @Override // java.util.AbstractSet, java.util.Collection, java.util.Set public boolean equals(Object obj) { return this == obj || a().keySet().equals(obj); } @Override // java.util.AbstractSet, java.util.Collection, java.util.Set public int hashCode() { return a().keySet().hashCode(); } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set public Iterator iterator() { return new a(a().entrySet().iterator()); } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean remove(Object obj) { int i10; Collection remove = a().remove(obj); if (remove != null) { i10 = remove.size(); remove.clear(); d dVar = d.this; d.n(dVar, d.m(dVar) - i10); } else { i10 = 0; } return i10 > 0; } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class f extends d.i implements NavigableMap> { f(NavigableMap> navigableMap) { super(navigableMap); } @Override // java.util.NavigableMap public Map.Entry> ceilingEntry(K k2) { Map.Entry> ceilingEntry = i().ceilingEntry(k2); if (ceilingEntry == null) { return null; } return e(ceilingEntry); } @Override // java.util.NavigableMap public K ceilingKey(K k2) { return i().ceilingKey(k2); } @Override // java.util.NavigableMap public NavigableSet descendingKeySet() { return descendingMap().navigableKeySet(); } @Override // java.util.NavigableMap public NavigableMap> descendingMap() { return new f(i().descendingMap()); } @Override // java.util.NavigableMap public Map.Entry> firstEntry() { Map.Entry> firstEntry = i().firstEntry(); if (firstEntry == null) { return null; } return e(firstEntry); } @Override // java.util.NavigableMap public Map.Entry> floorEntry(K k2) { Map.Entry> floorEntry = i().floorEntry(k2); if (floorEntry == null) { return null; } return e(floorEntry); } @Override // java.util.NavigableMap public K floorKey(K k2) { return i().floorKey(k2); } @Override // java.util.NavigableMap public NavigableMap> headMap(K k2, boolean z10) { return new f(i().headMap(k2, z10)); } @Override // java.util.NavigableMap public Map.Entry> higherEntry(K k2) { Map.Entry> higherEntry = i().higherEntry(k2); if (higherEntry == null) { return null; } return e(higherEntry); } @Override // java.util.NavigableMap public K higherKey(K k2) { return i().higherKey(k2); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: j */ public NavigableSet f() { return new g(i()); } /* renamed from: k */ public NavigableMap> headMap(K k2) { return headMap(k2, false); } /* renamed from: l */ public NavigableSet keySet() { return (NavigableSet) super.keySet(); } @Override // java.util.NavigableMap public Map.Entry> lastEntry() { Map.Entry> lastEntry = i().lastEntry(); if (lastEntry == null) { return null; } return e(lastEntry); } @Override // java.util.NavigableMap public Map.Entry> lowerEntry(K k2) { Map.Entry> lowerEntry = i().lowerEntry(k2); if (lowerEntry == null) { return null; } return e(lowerEntry); } @Override // java.util.NavigableMap public K lowerKey(K k2) { return i().lowerKey(k2); } Map.Entry> m(Iterator>> it) { if (!it.hasNext()) { return null; } Map.Entry> next = it.next(); Collection r10 = d.this.r(); r10.addAll(next.getValue()); it.remove(); return c0.c(next.getKey(), d.this.x(r10)); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: n */ public NavigableMap> i() { return (NavigableMap) super.i(); } @Override // java.util.NavigableMap public NavigableSet navigableKeySet() { return keySet(); } /* renamed from: o */ public NavigableMap> subMap(K k2, K k10) { return subMap(k2, true, k10, false); } /* renamed from: p */ public NavigableMap> tailMap(K k2) { return tailMap(k2, true); } @Override // java.util.NavigableMap public Map.Entry> pollFirstEntry() { return m(entrySet().iterator()); } @Override // java.util.NavigableMap public Map.Entry> pollLastEntry() { return m(descendingMap().entrySet().iterator()); } @Override // java.util.NavigableMap public NavigableMap> subMap(K k2, boolean z10, K k10, boolean z11) { return new f(i().subMap(k2, z10, k10, z11)); } @Override // java.util.NavigableMap public NavigableMap> tailMap(K k2, boolean z10) { return new f(i().tailMap(k2, z10)); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class g extends d.j implements NavigableSet { g(NavigableMap> navigableMap) { super(navigableMap); } @Override // java.util.NavigableSet public K ceiling(K k2) { return c().ceilingKey(k2); } /* renamed from: d */ public NavigableSet headSet(K k2) { return headSet(k2, false); } @Override // java.util.NavigableSet public Iterator descendingIterator() { return descendingSet().iterator(); } @Override // java.util.NavigableSet public NavigableSet descendingSet() { return new g(c().descendingMap()); } @Override // java.util.NavigableSet public K floor(K k2) { return c().floorKey(k2); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: g */ public NavigableMap> c() { return (NavigableMap) super.c(); } /* renamed from: h */ public NavigableSet subSet(K k2, K k10) { return subSet(k2, true, k10, false); } @Override // java.util.NavigableSet public NavigableSet headSet(K k2, boolean z10) { return new g(c().headMap(k2, z10)); } @Override // java.util.NavigableSet public K higher(K k2) { return c().higherKey(k2); } /* renamed from: i */ public NavigableSet tailSet(K k2) { return tailSet(k2, true); } @Override // java.util.NavigableSet public K lower(K k2) { return c().lowerKey(k2); } @Override // java.util.NavigableSet public K pollFirst() { return (K) y.i(iterator()); } @Override // java.util.NavigableSet public K pollLast() { return (K) y.i(descendingIterator()); } @Override // java.util.NavigableSet public NavigableSet subSet(K k2, boolean z10, K k10, boolean z11) { return new g(c().subMap(k2, z10, k10, z11)); } @Override // java.util.NavigableSet public NavigableSet tailSet(K k2, boolean z10) { return new g(c().tailMap(k2, z10)); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ private class h extends d.l implements RandomAccess { h(K k2, List list, d.k kVar) { super(k2, list, kVar); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ private class i extends d.c implements SortedMap> { /* renamed from: n reason: collision with root package name */ SortedSet f21676n; i(SortedMap> sortedMap) { super(sortedMap); } @Override // java.util.SortedMap public Comparator comparator() { return i().comparator(); } SortedSet f() { return new j(i()); } @Override // java.util.SortedMap public K firstKey() { return i().firstKey(); } /* renamed from: h */ public SortedSet keySet() { SortedSet sortedSet = this.f21676n; if (sortedSet != null) { return sortedSet; } SortedSet f2 = f(); this.f21676n = f2; return f2; } public SortedMap> headMap(K k2) { return new i(i().headMap(k2)); } SortedMap> i() { return (SortedMap) this.f21658l; } @Override // java.util.SortedMap public K lastKey() { return i().lastKey(); } public SortedMap> subMap(K k2, K k10) { return new i(i().subMap(k2, k10)); } public SortedMap> tailMap(K k2) { return new i(i().tailMap(k2)); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ private class j extends d.e implements SortedSet { j(SortedMap> sortedMap) { super(sortedMap); } SortedMap> c() { return (SortedMap) super.a(); } @Override // java.util.SortedSet public Comparator comparator() { return c().comparator(); } @Override // java.util.SortedSet public K first() { return c().firstKey(); } public SortedSet headSet(K k2) { return new j(c().headMap(k2)); } @Override // java.util.SortedSet public K last() { return c().lastKey(); } public SortedSet subSet(K k2, K k10) { return new j(c().subMap(k2, k10)); } public SortedSet tailSet(K k2) { return new j(c().tailMap(k2)); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class k extends AbstractCollection { /* renamed from: j reason: collision with root package name */ final K f21679j; /* renamed from: k reason: collision with root package name */ Collection f21680k; /* renamed from: l reason: collision with root package name */ final d.k f21681l; /* renamed from: m reason: collision with root package name */ final Collection f21682m; /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class a implements Iterator { /* renamed from: j reason: collision with root package name */ final Iterator f21684j; /* renamed from: k reason: collision with root package name */ final Collection f21685k; a() { Collection collection = k.this.f21680k; this.f21685k = collection; this.f21684j = d.l(collection); } a(Iterator it) { this.f21685k = k.this.f21680k; this.f21684j = it; } Iterator b() { c(); return this.f21684j; } void c() { k.this.h(); if (k.this.f21680k != this.f21685k) { throw new ConcurrentModificationException(); } } @Override // java.util.Iterator public boolean hasNext() { c(); return this.f21684j.hasNext(); } @Override // java.util.Iterator public V next() { c(); return this.f21684j.next(); } @Override // java.util.Iterator public void remove() { this.f21684j.remove(); d.p(d.this); k.this.i(); } } k(K k2, Collection collection, d.k kVar) { this.f21679j = k2; this.f21680k = collection; this.f21681l = kVar; this.f21682m = kVar == null ? null : kVar.d(); } void a() { d.k kVar = this.f21681l; if (kVar != null) { kVar.a(); } else { d.k(d.this).put(this.f21679j, this.f21680k); } } @Override // java.util.AbstractCollection, java.util.Collection public boolean add(V v10) { h(); boolean isEmpty = this.f21680k.isEmpty(); boolean add = this.f21680k.add(v10); if (add) { d.o(d.this); if (isEmpty) { a(); } } return add; } @Override // java.util.AbstractCollection, java.util.Collection public boolean addAll(Collection collection) { if (collection.isEmpty()) { return false; } int size = size(); boolean addAll = this.f21680k.addAll(collection); if (addAll) { int size2 = this.f21680k.size(); d dVar = d.this; d.n(dVar, d.m(dVar) + (size2 - size)); if (size == 0) { a(); } } return addAll; } d.k c() { return this.f21681l; } @Override // java.util.AbstractCollection, java.util.Collection public void clear() { int size = size(); if (size != 0) { this.f21680k.clear(); d dVar = d.this; d.n(dVar, d.m(dVar) - size); i(); } } @Override // java.util.AbstractCollection, java.util.Collection public boolean contains(Object obj) { h(); return this.f21680k.contains(obj); } @Override // java.util.AbstractCollection, java.util.Collection public boolean containsAll(Collection collection) { h(); return this.f21680k.containsAll(collection); } Collection d() { return this.f21680k; } @Override // java.util.Collection public boolean equals(Object obj) { if (obj == this) { return true; } h(); return this.f21680k.equals(obj); } K g() { return this.f21679j; } void h() { Collection collection; d.k kVar = this.f21681l; if (kVar != null) { kVar.h(); if (this.f21681l.d() != this.f21682m) { throw new ConcurrentModificationException(); } } else if (this.f21680k.isEmpty() && (collection = (Collection) d.k(d.this).get(this.f21679j)) != null) { this.f21680k = collection; } } @Override // java.util.Collection public int hashCode() { h(); return this.f21680k.hashCode(); } void i() { d.k kVar = this.f21681l; if (kVar != null) { kVar.i(); } else if (this.f21680k.isEmpty()) { d.k(d.this).remove(this.f21679j); } } @Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable public Iterator iterator() { h(); return new a(); } @Override // java.util.AbstractCollection, java.util.Collection public boolean remove(Object obj) { h(); boolean remove = this.f21680k.remove(obj); if (remove) { d.p(d.this); i(); } return remove; } @Override // java.util.AbstractCollection, java.util.Collection public boolean removeAll(Collection collection) { if (collection.isEmpty()) { return false; } int size = size(); boolean removeAll = this.f21680k.removeAll(collection); if (removeAll) { int size2 = this.f21680k.size(); d dVar = d.this; d.n(dVar, d.m(dVar) + (size2 - size)); i(); } return removeAll; } @Override // java.util.AbstractCollection, java.util.Collection public boolean retainAll(Collection collection) { qa.h.j(collection); int size = size(); boolean retainAll = this.f21680k.retainAll(collection); if (retainAll) { int size2 = this.f21680k.size(); d dVar = d.this; d.n(dVar, d.m(dVar) + (size2 - size)); i(); } return retainAll; } @Override // java.util.AbstractCollection, java.util.Collection public int size() { h(); return this.f21680k.size(); } @Override // java.util.AbstractCollection public String toString() { h(); return this.f21680k.toString(); } } /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ class l extends d.k implements List { /* compiled from: AbstractMapBasedMultimap.java */ /* loaded from: classes4.dex */ private class a extends d.k.a implements ListIterator { a() { super(); } public a(int i10) { super(l.this.k().listIterator(i10)); } private ListIterator d() { return (ListIterator) b(); } @Override // java.util.ListIterator public void add(V v10) { boolean isEmpty = l.this.isEmpty(); d().add(v10); d.o(d.this); if (isEmpty) { l.this.a(); } } @Override // java.util.ListIterator public boolean hasPrevious() { return d().hasPrevious(); } @Override // java.util.ListIterator public int nextIndex() { return d().nextIndex(); } @Override // java.util.ListIterator public V previous() { return d().previous(); } @Override // java.util.ListIterator public int previousIndex() { return d().previousIndex(); } @Override // java.util.ListIterator public void set(V v10) { d().set(v10); } } l(K k2, List list, d.k kVar) { super(k2, list, kVar); } @Override // java.util.List public void add(int i10, V v10) { h(); boolean isEmpty = d().isEmpty(); k().add(i10, v10); d.o(d.this); if (isEmpty) { a(); } } @Override // java.util.List public boolean addAll(int i10, Collection collection) { if (collection.isEmpty()) { return false; } int size = size(); boolean addAll = k().addAll(i10, collection); if (addAll) { int size2 = d().size(); d dVar = d.this; d.n(dVar, d.m(dVar) + (size2 - size)); if (size == 0) { a(); } } return addAll; } @Override // java.util.List public V get(int i10) { h(); return k().get(i10); } @Override // java.util.List public int indexOf(Object obj) { h(); return k().indexOf(obj); } List k() { return (List) d(); } @Override // java.util.List public int lastIndexOf(Object obj) { h(); return k().lastIndexOf(obj); } @Override // java.util.List public ListIterator listIterator() { h(); return new a(); } @Override // java.util.List public ListIterator listIterator(int i10) { h(); return new a(i10); } @Override // java.util.List public V remove(int i10) { h(); V remove = k().remove(i10); d.p(d.this); i(); return remove; } @Override // java.util.List public V set(int i10, V v10) { h(); return k().set(i10, v10); } /* JADX WARN: Multi-variable type inference failed */ @Override // java.util.List public List subList(int i10, int i11) { h(); return d.this.z(g(), k().subList(i10, i11), c() == null ? this : c()); } } protected d(Map> map) { qa.h.d(map.isEmpty()); this.f21654n = map; } static /* synthetic */ Map k(d dVar) { return dVar.f21654n; } static /* synthetic */ Iterator l(Collection collection) { return v(collection); } static /* synthetic */ int m(d dVar) { return dVar.f21655o; } static /* synthetic */ int n(d dVar, int i10) { dVar.f21655o = i10; return i10; } static /* synthetic */ int o(d dVar) { int i10 = dVar.f21655o; dVar.f21655o = i10 + 1; return i10; } static /* synthetic */ int p(d dVar) { int i10 = dVar.f21655o; dVar.f21655o = i10 - 1; return i10; } static /* synthetic */ void q(d dVar, Object obj) { dVar.w(obj); } private static Iterator v(Collection collection) { return collection instanceof List ? ((List) collection).listIterator() : collection.iterator(); } private void w(Object obj) { Collection collection = (Collection) c0.h(this.f21654n, obj); if (collection != null) { int size = collection.size(); collection.clear(); this.f21655o -= size; } } @Override // ra.f, ra.d0 public Collection> a() { return super.a(); } @Override // ra.d0 public void clear() { for (Collection collection : this.f21654n.values()) { collection.clear(); } this.f21654n.clear(); this.f21655o = 0; } @Override // ra.f Collection> e() { return new f.a(); } @Override // ra.f Collection g() { return new f.b(); } @Override // ra.d0 public Collection get(K k2) { Collection collection = this.f21654n.get(k2); if (collection == null) { collection = s(k2); } return y(k2, collection); } @Override // ra.f Iterator> h() { return new b(); } @Override // ra.f Iterator j() { return new a(); } @Override // ra.d0 public boolean put(K k2, V v10) { Collection collection = this.f21654n.get(k2); if (collection == null) { Collection s10 = s(k2); if (s10.add(v10)) { this.f21655o++; this.f21654n.put(k2, s10); return true; } throw new AssertionError("New Collection violated the Collection spec"); } else if (!collection.add(v10)) { return false; } else { this.f21655o++; return true; } } abstract Collection r(); Collection s(K k2) { return r(); } @Override // ra.d0 public int size() { return this.f21655o; } final Map> t() { Map> map = this.f21654n; return map instanceof NavigableMap ? new f((NavigableMap) this.f21654n) : map instanceof SortedMap ? new i((SortedMap) this.f21654n) : new c(this.f21654n); } final Set u() { Map> map = this.f21654n; return map instanceof NavigableMap ? new g((NavigableMap) this.f21654n) : map instanceof SortedMap ? new j((SortedMap) this.f21654n) : new e(this.f21654n); } @Override // ra.f, ra.d0 public Collection values() { return super.values(); } abstract Collection x(Collection collection); abstract Collection y(K k2, Collection collection); final List z(K k2, List list, d.k kVar) { return list instanceof RandomAccess ? new h(k2, list, kVar) : new l(k2, list, kVar); } }