package com.google.common.collect; import java.io.Serializable; import java.util.Iterator; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public final class ImmutableMapKeySet extends IndexedImmutableSet { private final ImmutableMap map; /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.common.collect.ImmutableCollection public final boolean isPartialView() { return true; } @Override // com.google.common.collect.IndexedImmutableSet, com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set, java.util.NavigableSet, com.google.common.collect.SortedIterable public final /* bridge */ /* synthetic */ Iterator iterator() { return iterator(); } /* JADX INFO: Access modifiers changed from: package-private */ public ImmutableMapKeySet(ImmutableMap immutableMap) { this.map = immutableMap; } @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set public final int size() { return this.map.size(); } @Override // com.google.common.collect.IndexedImmutableSet, com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set, java.util.NavigableSet, com.google.common.collect.SortedIterable public final UnmodifiableIterator iterator() { return this.map.keyIterator(); } @Override // com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.util.Set public final boolean contains(Object obj) { return this.map.containsKey(obj); } @Override // com.google.common.collect.IndexedImmutableSet final K get(int i) { return this.map.entrySet().asList().get(i).getKey(); } @Override // com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection final Object writeReplace() { return new KeySetSerializedForm(this.map); } /* loaded from: classes2.dex */ static class KeySetSerializedForm implements Serializable { private static final long serialVersionUID = 0; final ImmutableMap map; KeySetSerializedForm(ImmutableMap immutableMap) { this.map = immutableMap; } Object readResolve() { return this.map.keySet(); } } }