package com.google.common.collect; import java.io.Serializable; import javax.annotation.CheckForNull; /* JADX INFO: Access modifiers changed from: package-private */ @ElementTypesAreNonnullByDefault /* loaded from: classes3.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 boolean isPartialView() { return true; } /* 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 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 UnmodifiableIterator iterator() { return this.map.keyIterator(); } @Override // com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection, java.util.Set public boolean contains(@CheckForNull Object obj) { return this.map.containsKey(obj); } @Override // com.google.common.collect.IndexedImmutableSet K get(int i) { return this.map.entrySet().asList().get(i).getKey(); } @Override // com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection Object writeReplace() { return new KeySetSerializedForm(this.map); } /* loaded from: classes3.dex */ private 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(); } } }